Identity and Inverse Matrices.

Benjamin Vanous
7 min readMay 26, 2022

--

In this article I will be writing about matrix identities and inverse matrices, so to start off lets first take an equation like the one below:

A represents a known matrix, b is a known vector, and x is a vector of unknown variables we want to discover. If your unaware what vectors and matrices are, you can refer here to another notebook where I briefly went through the meaning of them.

In order to be able to discover the variables in x, we need to use matrix inversion. To describe matrix inversion, we first need to understand what an identity matrix is as well as what row operations are, so we’ll be going over these first.

Identity Matrix:

We denote the identity matrix using I, heres a few examples:

  • The following is a 1x1, 2x2, 3x3, and nxn identity matrix respectively.

Notice how the ones run along the matrix while the rest are all zeros, this is important in that when you multiply our known matrix A with its identity matrix I, it will return an exact copy of A. Furthurmore we can say that IA=A, and in general AI=IA=A. So if we were to say for example that A was a 3x3 matrix, then:

  • The identity matrix of A will always be of the same length as A

Row Operations:

Row transformations, or more commonly reffered to as ‘Row Operations’ is used for simplifying a matrix down to its identity matrix. The transformation only has 3 rules, or operations, see below:

Your able to flip rows around, multiply a row by a number other than zero, and add or subtract one row to another row. If you wanted to, you can actually solve for x using only row operaitons, lets take a look at the first equation again:

Like before, say we already know matrix A, and the vector output b. In order to find x using only row operations, we would first put both A and b side by side for simplicity, and then apply row operations to A, while at the same time applying all those transformations to b. See the example below:

  • In the example above A represents a matrix of [[2,2],[-2,-3]] and b represents the vector [10,3], and you can see that we join them side by side for easier transformation.’

There is no real sturcture to how you transform the rows, the main goal is just simplifying matrix A down to the identity matrix. So for the example above we decided to first add row one with row two, then multiplied row one by 0.5 in step two, after that we multiplied row two by -1 in step three, and finally subtracted row one with row two in the final step giving us the identity matrix as well as the transformed b.

After simplifying matrix A down to its identity matrix as well as applying those row transfomrations to vector b, we can come to the conclusion that x equals a vector of [18,-13]. We can furthur justify this by multiplying the orginal matrix A times this new vector x, which will give the original vector of b.

Inverse Matrices:

An inverse matrix is another matrix which opon multiplying with matrix A gives the identity matrix. and is denoted with a -1, so the inverse of A would be denoted as A^-1. So if we look at the first equation again:

And we multiply the inverse to both sides:

We get the above equation, but you can simplify this further as the inverse of A multiplied by the original (A^-1 x A) will give us the identity matrix:

Which simplifies even further to this:

This implys that the inverse of A multiplied by the vector b gives us x. But how exactly do you find the inverse of A? One of the most common ways is by using Gauss-Jordan elimination, the basic principle of this equation is by having both A and the identity matrix of A side by side, and then performing row operations on A and using those same transformations on the identity matrix. So for example lets say matrix A is a set of numbers like this:

Our first step would be joining both A and its identity matrix side by side:

Then you apply row operations to A, and applying those same row operations to the identity matrix like this:

*The above is also a good example showing that you can use multiple methods of row operations when applying the same transformations, this makes it a bit more confusing, but it makes for less writing.

In the above row operations, we first subtracted row two by 2, and then multiplied it by row one. After that we subtracted row one by 3, and then multiplied it by row two. In the end, what we get is the conversion of A to its identity matrix on the left, as well as the conversion of A’s identiy matrix to its inverse matrix on the right. That is how you get the Inverse of matrix A.

If not invertible:

There is one minor caveat to matrix inversion thats improtant to know, and that is determining whether it is even invertible or not. In order to tell if a matrix is invertable or not you fist need to go through the row transformations like before, and if our original matrix A is transformed into a matrix with a set of 0's on the bottom row, this will mean the matrix is not invertible. Lets see an example for clarification, say we have a new matrix A like this:

And we join it with its identity matrix side by side again:

And then try to simplify A down to its identity matrix again using row operations:

We get a set of 0's on the bottom row, signifying its impossible to get the identity matrix for matrix A, which further signifies we wont be able to get the inverstion of A. So in short, when we’re trying to find the matrix inversion of matrix A, and are unable to simplify A down to its matrix identity, we’ll know that the matrix is not invertible.

One last example:

Now that we know how matirx inversion works, lets try a more complex example just for fun. Lets say we now have a 3x3 matrix like this:

We just need to folow the same process as before, joining it with its matrix identity side by side:

And then execute the row operations on A, and applying those same transformations to the its identity matrix on the other side

The resulting inverse matrix is:

Conclusion:

In this article we learned about what identity matrices, row operations and inverse matrices are. We found how you can utilize the identity matrix to solve for an unkown vector x using one of two strategies, row operations or inverse matrices. We also found how to see whether a matrix is invertable or not. I hope you’ve enjoyed :)

Sources:

https://www.deeplearningbook.org/contents/linear_algebra.html

https://www.cuemath.com/algebra/inverse-of-a-matrix/

https://en.wikipedia.org/wiki/Invertible_matrix

https://www.mathportal.org/linear-algebra/matrices/gauss-jordan.php

https://www.purplemath.com/modules/mtrxinvr.htm

--

--