This video is the final part in a six part series on matrices and matrix math.
None of these videos are for any particular program.
This final video is over the inverse of a matrix.
The inverse of a number is where you essentially flip the number upside down., so for example
if your number is 12 then it's inverse is going to be 1/12.
If your number is 3/2 it's inverse is 2/3.
One of the most important characteristics of an inverse is that when you multiply it
by it's original you always return the number 1.
Inverses are extremely useful when you're working with complicated calculations.
Here we have the equation AB+(C^2+D)/(3/2).
This can be a lot easier to read if you simply use an inverse.
When you're calculating with matrices you aren't able to divide it all, so you need
to rather multiply by the matrices inverse.
Calculating the inverse of a matrix by hand is difficult, but it is possible.
You need to use the characteristic of an inverse, that by multiplying an inverse by it's original
you will get back the number 1 for a single value, or the identity matrix if you're working
with matrices.
I am going to be using a very simple example that I got from the website purplemath.com.
This example is unique in the fact that they're using an entirely integer matrix, which means
that not only is the original matrix completely filled with integers, but it's resulting inverse
is as well.
This makes it much easier to calculate by hand.
Now I am not expecting you how to understand how to calculate the inverse of any matrix
after watching this video, but it does help that when you're using a tool on a computer
or program to understand the basics of how the computer works, or in this case if you're
going to be using excel to calculate the inverse of a matrix it helps to have a general idea
how the matrix would be calculated by hand.
So for this example the matrix they give is called matrix A. Now I need an inverse that
when it's multiplied by A it will return the 3x3 identity matrix, which is I. To set this
up, it helps to put the two together.
So if I create a double wide matrix and put the identity matrix on the other side this
will help me perform the calculations to generate the inverse of this matrix.
Now to calculate this you have to perform the calculations on each row of this matrix.
To make the left hand side turn into the identity matrix that's currently on the right.
This situation is fairly simple since these rows are pretty close in number.
So to start with I am going to change row number 2.
So for row number 2 I am going to alter that by subtracting row 1 from it.
So if I go down here and I still have row number 1 the same and row number 3 the same,
except row number 2 is now 0, and then 4-3 is 1, 3-3 is 0, that becomes a -1, that remains
1, and that remains 0.
I can change row number 3 by doing the same thing that I just did to row number 2.
I am just going to erase whats currently in row number 3, and row number 3-row number
1, so that becomes a 0, a 0, and a 1.
That's a -1, a 0, and a 1.
Now finally I need to change the first row, because I have these bottom two rows on the
left side the same as the identity matrix was previously.
So to change the first row, first I am going to subtract 3 times the second row.
I am going to keep my second and third row the same.
So 0*-3 is still 0, so that remains a 1, then this becomes a 0 because I am subtracting
-3 from it, and that remains a 3.
-3*-1 is 3, that becomes 4.
That becomes a -3, and this remains a 0.
Now I need to do the same thing with row number 3, so I need to multiply row number 3 by -3
and then subtract row number 1 from it.
So that becomes a 1, that stays zero, and this -3 from 3 is 0, and now here 4+3 is 7,
that remains a negative 3, and that becomes -3.
Now this right here, this matrix, that's 7, -3, -3, -1, 1, 0, -1, 0 1, this is the inverse
of my original matrix A. One way to test this is to multiply A*A^-1 and see if we get back
the identity matrix.
Now if we step through this for the first spot here we multiply the first row here times
the first column here, so 7-3-3 becomes 1, and then -3+3 is 0, and then -3+0+3 is 0.
Second row is 7-4-3, that's 0.
-3+4 is 1, and then -3+0+3 is 0, 7-3-4 is 0.
-3+3+0 is 0, and then -3+0+4 is 1, and we've returned our identity matrix.
So this has been confirmed to be the inverse of this matrix here.
So essentially what we did here is we may have multiplied A by its inverse.
You can also think of this as us having divided A by itself.
So later on when you're working with matrices and you need to divide the two matrices don't
forget the inverse, because if I had a matrix B that I had to divide A into I would instead
do B*A^-1