Inverse matrices

An inverse matrix is a matrix that is defined on square regular matrices. When the matrix and its inverse matrix are multiplied, we then get the unit matrix.

Definition

The inverse matrix can only be calculated from a square matrix, the inverse matrix is not defined on a rectangular matrix. Furthermore, an inverse matrix to a matrix A (denoted by A−1) exists only if the matrix is regular (has no linearly dependent rows). This matrix is then uniquely determined. The two main properties of the inverse matrix are:

$$(A^{-1})^{-1}=A$$

Most importantly, the most important property of an inverse matrix (which is also the definition of an inverse matrix):

$$A\cdot A^{-1} = E$$

E it is a unit matrix.

How to calculate the inverse matrix

Now to the method of calculating the inverse matrix. The simplest algorithm is the Gaussian elimination method, which consists in modifying the matrix A into a unit matrix and writing the unit matrix next to this matrix, and making the same modifications to this matrix as to the matrix A. At the end of the computational process, you have the matrix A modified to the unit matrix on the left and the inverse matrix on the right. Let's try this out with a simple example:

$$\left(\begin{array}{cc}1&2\\3&4\end{array}\right)$$

A quick glance shows that the matrix is regular, so it makes sense to compute the inverse matrix. When we compute the inverse matrix, we usually write it in the form:

$$\left(\begin{array}{cc|cc}1&2&1&0\\3&4&0&1\end{array}\right)$$

Now we'll adjust the left matrix to a unit matrix, and make identical adjustments to the right matrix. We add −3 the multiple of the first row to the second. First the left matrix:

$$\left(\begin{array}{cc|cc}1&2&1&0\\0&-2&0&1\end{array}\right)$$

Now we add −3 the multiple of the first row of the right matrix to the second row of the right matrix:

$$\left(\begin{array}{cc|cc}1&2&1&0\\0&-2&-3&1\end{array}\right)$$

Now we need to get a zero at the position a12. Just add the second row to the first row. I will now make both adjustments in one step:

$$\left(\begin{array}{cc|cc}1&0&-2&1\\0&-2&-3&1\end{array}\right)$$

Now we get rid of the minus two by dividing the whole row by minus two:

$$\left(\begin{array}{cc|cc}1&0&-2&1\\0&1&\frac32&-\frac12\end{array}\right)$$

The resulting inverse matrix is:

$$\left(\begin{array}{cc}-2&1\\\frac32&-\frac12\end{array}\right)$$

If you want to check if the calculated inverse matrix is correct, multiply it with the original matrix:

$$\left(\begin{array}{cc}-2&1\\\frac32&-\frac12\end{array}\right)\cdot\left(\begin{array}{cc}1&2\\3&4\end{array}\right)=\left(\begin{array}{cc}1&0\\0&1\end{array}\right)$$

To check, you can look at WolframAlpha.

Calculation using the determinant

We can still calculate the inverse matrix using the determinant. It is true that if we have a regular matrix A, then the inverse matrix A−1 has elements a−1ij, which are equal:

$$a^{-1}_{ij}=\frac{(-1)^{i+j}\cdot\left|A_{j,i}\right|}{\left|A\right|}$$

On the left hand side we have i,j, but in the numerator we have j,i, watch out for this, it is not a mistake to switch it like this. In the numerator we have the matrix Aj,i, which is a submatrix of the matrix A, which we get by removing the j-th row and i-th column from the matrix A. So if

$$ A=\begin{pmatrix} 1&2&3\\ 4&5&6\\ 7&8&9 \end{pmatrix}, $$

it is:

$$ A_{1{,}1}=\begin{pmatrix} \not{1}&\not{2}&\not{3}\\ \not{4}&5&6\\ \not{7}&8&9 \end{pmatrix}= \begin{pmatrix} 5&6\\ 8&9 \end{pmatrix},\quad A_{1{,}3}=\begin{pmatrix} 4&5\\ 7&8 \end{pmatrix},\quad A_{2{,}2}=\begin{pmatrix} 1&3\\ 7&9 \end{pmatrix} $$

If you don't like that there are reversed indices, we can still write it like this:

$$(a^{-1}_{ij})^T=\frac{(-1)^{i+j}\cdot\left|A_{i,j}\right|}{\left|A\right|}$$

Or, if you don't flip the indices, you compute the transposed inverse matrix. If you transpose this transposed matrix again, you get the inverse matrix.

Calculating using this method is usually tedious, and it is particularly suited for machine processing because it is very straightforward. In the example, we will try to calculate just two numbers. So let's have this matrix:

$$ A=\begin{pmatrix} 3&-4&5\\ 2&-3&1\\ 3&-5&-1 \end{pmatrix} $$

First we calculate the determinant of the integer of this matrix, this is used in the denominator of the fraction:

$$det(A)=-1$$

Now we calculate the first element of the inverse matrix. Let's label it a−111. It will be equal to:

$$a^{-1}_{11}=\frac{(-1)^{1+1}\cdot\left|A_{1{,}1}\right|}{\left|A\right|}$$

We will need the submatrix A1,1. By omitting the first row and the first column, we get:

$$A_{1{,}1}= \begin{pmatrix} -3&1\\ -5&-1 \end{pmatrix} $$

Now we need to calculate the determinant of this matrix:

$$det(A_{1{,}1})=8$$

And now we can completely plug in the formula:

$$a^{-1}_{11}=\frac{(-1)^{2}\cdot8}{-1}=\frac{1\cdot8}{-1}=-8$$

And we have the first result of the inverse matrix.

$$A^{-1}= \begin{pmatrix} -8&?&?\\ ?&?&?\\ ?&?&? \end{pmatrix}$$

We get the second number as follows:

$$a^{-1}_{12}=\frac{(-1)^{1+2}\cdot\left|A_{2{,}1}\right|}{\left|A\right|}$$

The determinant of the submatrix will be equal to

$$det(A_{2{,}1})= \begin{vmatrix} -4&5\\ -5&-1 \end{vmatrix}=29 $$

And by total substitution we get:

$$a^{-1}_{12}=\frac{(-1)^{3}\cdot29}{-1}=\frac{-1\cdot29}{-1}=\frac{-29}{-1}=29$$

Another piece to the puzzle:

$$A^{-1}= \begin{pmatrix} -8&29&?\\ ?&?&?\\ ?&?&? \end{pmatrix}$$

And so on, and so on.