
Inverse Matrix
Let me shed light on the notion of an inverse matrix and demonstrate how to calculate it.
So, what is an inverse matrix? Within the realm of mathematics, the inverse of a square matrix A, denoted as A-1, is such that when it's multiplied with A, it yields the identity matrix. In other words, if A is a square matrix of order n, then another matrix B of the same order n is deemed the inverse of A if the following holds true: $$ AB = BA = I $$where I represents the identity matrix of order n.
Interestingly, not all matrices have an inverse. A matrix only has an inverse if its determinant isn't zero.
Matrices possessing an inverse are referred to as invertible matrices.
On the flip side, those without an inverse are dubbed "singular" or "non-invertible" matrices.
Example of inverse matrix
Let's take a quick example.
Look at this 2x2 square matrix of order n=2
$$ M= \begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix} $$
The matrix M is deemed invertible as there exists another matrix, M-1, known as the inverse matrix
$$ M^{-1}= \begin{pmatrix} 3 & -2 \\ -4 & 3 \end{pmatrix} $$
The product M·M-1 gives the identity matrix.
$$ M \cdot M^{-1}= \begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix} \cdot \begin{pmatrix} 3 & -2 \\ -4 & 3 \end{pmatrix} $$
Perform the row-by-column multiplication of the two matrices.
$$ M \cdot M^{-1}= \begin{pmatrix} 3 \cdot 3 + 2 \cdot (-4) & 3 \cdot (-2) + 2 \cdot 3 \\ 4 \cdot 3 + 3 \cdot (-4) & 4 \cdot (-2) + 3 \cdot 3 \end{pmatrix} $$
$$ M \cdot M^{-1}= \begin{pmatrix} 9 -8 & -6 + 6 \\ 12 - 12 & -8 + 9 \end{pmatrix} $$
The final result is an identity matrix of order 2
$$ M \cdot M^{-1}= \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} $$
The identity matrix is a matrix with all 1s on the main diagonal and 0s everywhere else.
Hence, the matrix M is invertible and the matrix M^-1 is its inverse.
How do we find the inverse matrix?
Several methods exist to calculate the inverse matrix, and these depend on the size of the matrix.
Consider a 2x2 matrix:
$$ A= \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$
Its inverse matrix A-1 can be calculated using this formula:
$$ M^{-1}= \frac{1}{ \det(M) } \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} $$
where det(A) denotes the determinant of the matrix A.
Take this matrix for instance:
$$ M= \begin{pmatrix} 3 & 2 \\ 4 & 3 \end{pmatrix} $$
Given the values of the matrix a=3, b=2, c=4, and d=3 and that the determinant of matrix M is det(M)=1, the matrix M is invertible.
$$ \det(M)= 3 \cdot 3 - 4 \cdot 2 = 9-8 = 1 $$
The determinant is not zero, so the matrix M is invertible and you can continue the calculation. Substituting the values into the preceding formula, we find its inverse matrix:
$$ M^{-1}= \frac{1}{ \det(M) } \begin{pmatrix} d & -b \\ -c & a \end{pmatrix} $$
$$ M^{-1}= \frac{1}{ 1 } \begin{pmatrix} 3 & -2 \\ -4 & 3 \end{pmatrix} $$
$$ M^{-1}= \begin{pmatrix} 3 & -2 \\ -4 & 3 \end{pmatrix} $$
For matrices larger than 2x2, calculating the inverse becomes more intricate.
For a 3x3 matrix, a formula involving the adjugate matrix and the determinant of the matrix can be employed.
$$ M^{-1} = \frac{1}{\det(M)} \cdot adjoint(M) $$
Where adjoint(M) is the adjugate matrix and det(M) is the determinant of the matrix.
Let's illustrate with a 3x3 matrix example.
$$ M= \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix} $$
The determinant of the matrix M is det(M)=1
$$ \det(M)= 1 \cdot (1 \cdot 0 - 4 \cdot 6) - 2 \cdot (0 \cdot 0 - 4 \cdot 5) + 3 \cdot (0 \cdot 6 - 1 \cdot 5) $$
$$ \det(M)= 1 \cdot (0 - 24) - 2 \cdot (0 - 20) + 3 \cdot (0 - 5) $$
$$ \det(M)= 1 \cdot (-24) - 2 \cdot (- 20) + 3 \cdot (- 5) $$
$$ \det(M)= -24 +40 -15 $$
$$ \det(M)= 1 $$
Since the determinant is not zero, the matrix is invertible.
Now calculate the adjugate of matrix M.
$$ adjoint(M)= \begin{pmatrix} \det \begin{pmatrix} 1 & 4 \\ 6 & 0\end{pmatrix} & - \det \begin{pmatrix} 0 & 5 \\ 4 & 0\end{pmatrix} & \det \begin{pmatrix} 0 & 1 \\ 5 & 6\end{pmatrix} \\ - \det \begin{pmatrix} 2 & 3 \\ 6 & 0\end{pmatrix} & \det \begin{pmatrix} 1 & 3 \\ 5 & 0\end{pmatrix} & - \det \begin{pmatrix} 1 & 2 \\ 5 & 6\end{pmatrix} \\ \det \begin{pmatrix} 2 & 3 \\ 1 & 4\end{pmatrix} & - \det \begin{pmatrix} 1 & 3 \\ 0 & 4\end{pmatrix} & \det \begin{pmatrix} 1 & 2 \\ 0 & 1 \end{pmatrix} \end{pmatrix}^T $$
$$ adjoint(M)= \begin{pmatrix} -24 & 20 & - 5 \\ 18 & -15 & 4 \\ 5 & - 4 & 1 \end{pmatrix}^T $$
Now transpose the matrix, transforming the rows into columns
$$ adjoint(M)= \begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix} $$
At this point, you can calculate the inverse matrix using the following formula
$$ M^{-1} = \frac{1}{\det(M)} \cdot adjoint(M) $$
$$ M^{-1} = \frac{1}{1} \cdot \begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix} $$
So, the inverse matrix is
$$ M^{-1}= \begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix} $$
What about matrices of higher order?
While the adjugate matrix method is applicable for inverse calculation of matrices larger than 3x3, the calculation becomes exponentially more complex with increasing dimensions.
For matrices larger than three, simpler techniques such as the Gauss-Jordan method are available.