Latest Tweets

Inverse of matrices

Regular matrix

A square matrix $\mathbf{A}$ of order $n$ is a regular (invertible) matrix if exists a matrix $\mathbf{B}$  such that

$$\mathbf{A}\mathbf{B} = \mathbf{B} \mathbf{A} = \mathbf{I},$$

where $\mathbf{I}$ is an identity matrix. If a matrix $\mathbf{A}$ is not regular, then we say it is singular.

A matrix $\mathbf{B}$ is unique, what we can show from the definition above.

Therefore, for a matrix $\mathbf{B}$ we are introducing a special label: if a matrix $\mathbf{A}$ has the inverse, that we will denote as $\mathbf{A^{-1}}$. Now we have, by definition:

$$\mathbf{A} \mathbf{A^{-1}} =\mathbf{A^{-1}} \mathbf{A} = \mathbf{I}.$$

An identity matrix is the inverse of itself, that is, $\mathbf{I}  \cdot \mathbf{I} = \mathbf {I}$ and zero matrix does not have an inverse matrix.

An inverse matrix is a neutral element for multiplication of matrices.

 

For every two invertible matrices $\mathbf{A}$ and $\mathbf{B}$ of order $n$ and the identity matrix $\mathbf{I}$ of the same order is valid:

1.) $(\mathbf {A^{-1}})^{-1} = \mathbf{A}$,

2.) $(\mathbf{A} \cdot \mathbf{B})^{-1} = \mathbf{B^{-1}} \cdot \mathbf{A^{-1}}$,

3.) $\mathbf{I^{-1}} = \mathbf{I}$.

 

Our mission is to explore how to determine the inverse of matrices and which matrices even have the inverse matrix.

Example 1. Find the inverse matrix of the following matrix, if it exists:

$$\mathbf{A} = \begin{bmatrix} 3 & -1  \\ 1 & 0  \\ \end{bmatrix}$$

Solution:

We need to find a matrix $\mathbf{B} \in \mathbb{R} ^{2}$ such that $\mathbf{A} \mathbf{B}= \mathbf{I}$. Let

$$\mathbf{B} = \begin{bmatrix} a & b  \\ c & d  \\ \end{bmatrix}$$

Therefore, we need to find numbers $a, b, c$ and $d$ in such that

$$ \begin{bmatrix} 3 & -1  \\ 1& 0  \\ \end{bmatrix} \cdot \begin{bmatrix} a & b  \\ c & d  \\ \end{bmatrix}  = \begin{bmatrix} 1 & 0  \\ 0 & 1  \\ \end{bmatrix} $$

is valid.

Now we have $$ \begin{bmatrix} 3a-c & 3b-d  \\ a & b  \\ \end{bmatrix} = \begin{bmatrix} 1 & 0  \\ 0 & 1  \\ \end{bmatrix}$$

It follows

$$3a-c=1,$$

$$3 b – d = 0,$$

$$a=0,$$

$$b=1.$$

Finally, $a=0$, $b=1$, $c= -1$, $d=3$, that is

$$\mathbf{A^{-1}} = \begin{bmatrix} a & b  \\ c & d  \\ \end{bmatrix} =  \begin{bmatrix} 0 & 1  \\ -1 & 3  \\ \end{bmatrix}. $$

We would obtain the same result if we observed the condition $\mathbf{B} \mathbf{A} = \mathbf{I}$.

The formula for the inverse matrix of order $2$

For every matrix $\mathbf{A} \in \mathbb{R}^{2}$,

$$\mathbf{A^{-1}} = \frac{1}{ad – bc} \begin{bmatrix} d & -b \\ – c & a \\ \end{bmatrix}$$

is valid.

If $ad-bc=0$, then matrix doesn’t have an inverse matrix.

Example 2: Find the inverse matrix of the following matrix, if it exists:

$$\mathbf{A} = \begin{bmatrix} 4 & 7  \\ 1 & 6  \\ \end{bmatrix}.$$

Solution:

We will use the formula for the inverse matrix of order 2. We have

$$\mathbf{A^{-1}} = {\begin{bmatrix} 4 & 7  \\ 1 & 6  \\ \end{bmatrix}}^{-1}=\frac {1}{4 \cdot 6  – 1 \cdot 7}\begin{bmatrix} 6 & – 7  \\ -1 & 4  \\ \end{bmatrix} $$

$$= \frac{1}{17}\begin{bmatrix} 6 & – 7  \\ -1 & 4  \\ \end{bmatrix}$$

$$=\begin{bmatrix} \frac{6}{17} & \frac{-7}{17}  \\ \frac{-1}{17} &\frac{4}{17}  \\ \end{bmatrix}$$

Finding the inverse matrix using Cayley – Hamilton Theorem

The Cayley – Hamilton theorem:  If $p(t)$ is the characteristic polynomial for a square matrix $A$, then the matrix $p(A)$ is square zero matrix.

Example 3: Find the inverse matrix of the following matrix (if it exists) using Cayley – Hamilton Theorem:

$$\mathbf{A} =\begin{bmatrix} 3 & 0 & 2  \\ 2 & 0 & -1  \\ 0 & 1 & -1\end{bmatrix}$$

Solution: 

In order to apply the Cayley – Hamilton Theorem, we first need to find the characteristic polynomial $p(A)$ of the given matrix $A$.

We use formula $p(t)=det(A – tI)$, where $I$ is identity matrix. We have

$$p(t)=det(A – tI)={\begin{vmatrix}3 – t & 0 & 2\\2 & -t & -1\\ 0 & 1 & -1 – t \end{vmatrix}}.$$

We will use the first row cofactor expansion:

$$p(t)={\begin{vmatrix}3 – t & 0 & 2\\2 & -t & -1\\ 0 & 1 & -1 – t \end{vmatrix}}$$

$$=(3 – t) {\begin{vmatrix} -t & -1 \\ 1 & -1-t\end{vmatrix}} + 2 \cdot {\begin{vmatrix} 2 & -t \\ 0 & 1\end{vmatrix}}$$

$$= (3 – t) \cdot [-t \cdot (-1 – t) + 1] + 2 \cdot 2$$

$$=(3 – t) \cdot (t + t^2 + 1) + 4$$

$$=-t^3+2t^2+2t+7.$$

We have computed the characteristic polynomial: $p(t)=-t^3+2t^2+2t+7$.

According to the Cayley – Hamilton Theorem, $p(A)= -A^3+2A^2+2A+7I=0$. If we rearrange that expression, we get

$$-A^3+2A^2+2A=-7I$$

$$A(-A^2+2A+2I)=-7I$$

$$A\left(-\frac{1}{7}(-A^2+2A+2I)\right)=I.$$

Also, we have

$$\left(-\frac{1}{7}(-A^2+2A+2I)\right)A=I.$$

We conclude that the matrix $-\frac{1}{7}(-A^2+2A+2I)$ is the inverse matrix for $A$.

Therefore,

$$A^{-1}= -\frac{1}{7}(-A^2+2A+2I)$$

$$=-\frac{1}{7}\left(-\begin{bmatrix} 3 & 0 & 2  \\ 2 & 0 & -1  \\ 0 & 1 & -1\end{bmatrix} \cdot \begin{bmatrix} 3 & 0 & 2  \\ 2 & 0 & -1  \\ 0 & 1 & -1\end{bmatrix}+2 \cdot \begin{bmatrix} 3 & 0 & 2  \\ 2 & 0 & -1  \\ 0 & 1 & -1\end{bmatrix}+\begin{bmatrix} 2 & 0 & 0  \\ 0 & 2& 0  \\ 0 & 0 & 2\end{bmatrix}\right)$$

$$= -\frac{1}{7}\begin{bmatrix}-1 & -2 & 0 \\-2 & 3 & -7\\ -2 & 3 & 0 \end{bmatrix}.$$

The inverse matrix of matrix $A$ is:

$$A^{-1}= -\frac{1}{7}\begin{bmatrix}-1 & -2 & 0 \\-2 & 3 & -7\\ -2 & 3 & 0 \end{bmatrix}.$$