For more information, please see full course syllabus of Pre Calculus
For more information, please see full course syllabus of Pre Calculus
Determinants & Inverses of Matrices
 The inverse of a matrix A is some matrix A^{−1} such that when we multiply them together we get the identity matrix, I. In other words, they "cancel" each other.
 Not all matrices can be inverted. A matrix that can be is called invertible (or `nonsingular'). If it can not be inverted, it is singular. To be invertible, a matrix must have these properties:
 The matrix must be square,
 The determinant of the matrix must be nonzero.
 The determinant is a real number associated with a square matrix. The determinant of a matrix A is denoted by either det(A) or A. [Although A may look similar to absolute value, it is the determinant of A and can produce any real number (including negative numbers).] If the determinant of a matrix is nonzero, the matrix is invertible, and viceversa.
det
(A) ≠ 0 ⇔ A is invertible
det
(A) = 0 ⇔ A is not invertible  The determinant of a 2×2 matrix
is given byA = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦
A good mnemonic to remember this is to think in terms of diagonals: the down diagonal multiplied together then subtracted by the up diagonal (also multiplied).
det
(A) = A = ad − bc.  To take the determinant of a larger matrix, we need the two following concepts.
 Minors: For a square matrix A, the minor M_{ij} of the entry a_{ij} is the determinant of the matrix obtained by deleting the i^{th} row and j^{th} column.
 Cofactors: The cofactor is very closely based on the minor. It just multiplies the minor by 1 or −1 based on the location of the entry the minor comes from. The cofactor C_{ij} of the entry a_{ij} is given by
We can also see this as an alternating sign pattern. It's very similar to a chessboard where one color is positive and the other is negative. See the video for a visual reference.C_{ij} = (−1)^{i+j} M_{ij}.
Note that this is true for any value of k (as long as 1 ≤ k ≤ n). That is, we can choose to do this process with any row or column and get the same result.
det
(A) = A = a_{k1} C_{k1} + a_{k2}C_{k2} + …+ a_{kn} C_{kn} = a_{1k} C_{1k} + a_{2k}C_{2k} + …+ a_{nk} C_{nk}  For a 2×2 matrix
the inverse of A (if det(A) ≠ 0) isA = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦
, A^{−1} = 1 ad−bc
⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦
= 1
det
(A)
⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦
.  For the most part, at the level of this course or any similar math class, you will probably not need to compute the inverse of a matrix any larger than 2 ×2. If for some reason you need to calculate the inverse of a matrix that is larger than 2×2 and you must do it by hand, see the bottom of these notes.
 Given A and A^{−1}, we have A^{−1} A B = B: they cancel each other out and have no net effect. This is because
When multiplied together, they create the identity matrix I, which (as noted in the previous lesson) has no effect in multiplication.A^{−1} A = I = A A^{−1}.  It is important to note that if we multiply an equation by a matrix on both sides, we must choose a direction to multiply from and do the same for both sides of the equation. We must multiply on the left or on the right for both sides. [This is because PQ ≠ QP for most matrices.]
 To find the inverse of larger matrices by hand, we will need some techniques we haven't learned just yet. In the first part of the next lesson, we discuss augmented matrices, row operations, and GaussJordan elimination. If you're not familiar with these things, go check them out first. Here are the steps to find an inverse for any size matrix:
1. For an n ×n matrix A, begin by creating an augmented matrix with the identity matrix I_{n}:⎡
⎣
A I_{n} ⎤
⎦
2. Apply the method of GaussJordan elimination (use row operations) to reduce A (the left side) to I. The result of the augmented matrix will be⎡
⎣
I_{n} A^{−1} ⎤
⎦
3. Finally, check your work. It's very easy to make a mistake in all that arithmetic, so check by showing eitherA^{−1} A = I or AA^{−1} = I.
Determinants & Inverses of Matrices

 


 The determinant of a matrix is a real number associated with that matrix. (The determinant only exists for square matrices.) For a matrix A, the determinant of the matrix can be written as det(A) or A.
 For a 2×2 matrix, the determinant is is given as
A = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦⇒ det (A) = A = ad−bc  Thus, we plug in based on the above formula for the determinant:
det (A) = 5 ·2 − (−3) ·6 = 28

 


 If a matrix has large absolute value bars on either side instead of brackets, that is shorthand for saying it is the determinant of that matrix. Thus, for this problem, we're just looking for the determinant of that matrix.
 For a 2×2 matrix, the determinant is is given as
A = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦⇒ det (A) = A = ad−bc  Thus, we plug in based on the above formula for the determinant:
⎢
⎢
⎢
⎢7 6 5 2 ⎢
⎢
⎢
⎢= 7 ·2 − 6 ·5 = −16

 


 For a matrix to be invertible (able to be inverted), it must have a nonzero determinant.
Thus, to check if A can be inverted, we must find its determinant.det (A) ≠ 0 ⇔ A is invertible ⎢
⎢det (A) = 0 ⇔ A is not invertible  For a 2×2 matrix, the determinant is is given as
A = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦⇒ det (A) = A = ad−bc  Thus, we plug in based on the above formula for the determinant:
Therefore, since the determinant is 0, it can not be inverted.det (A) = 8 ·45 − 20 ·18 = 360 − 360 = 0

 


 First, determine if A is invertible by making sure det(A) ≠ 0. For a 2×2 matrix, the determinant is is given as
Thus, for our matrix, we haveA = ⎡
⎢
⎢
⎣a b c d ⎤
⎥
⎥
⎦⇒ det (A) = A = ad−bc
Since det(A) = 4 ≠ 0, we see that A can be inverted.det (A) = 8 ·2 − 4 ·3 = 4.  For a 2 ×2 matrix, the inverse of the matrix (if det(A) ≠ 0) is as follows:
A^{−1} = 1 det (A) ⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦= 1 ad−bc⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦  Thus, since we already found the determinant of our matrix (det(A) = 4), we can just plug in and find A^{−1}:
A^{−1} = 1 4· ⎡
⎢
⎢
⎣2 −4 −3 8 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎢
⎢
⎢
⎣1 2−1 − 3 42 ⎤
⎥
⎥
⎥
⎥
⎥
⎦

 



 


 Start off by finding X^{−1}. The problem basically guarantees that it exists, but it's still useful to find the determinant of X since we'll use it later:
Great, so X definitely does have an inverse (since det(X) ≠ 0). Now we work to find the inverse.det (X) = 2 ·9 − (−5)·(−3) = 3  For a 2 ×2 matrix, the inverse of the matrix (if det(A) ≠ 0) is as follows:
Therefore, we follow the same structure to find X^{−1}:A^{−1} = 1 det (A) ⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦= 1 ad−bc⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦X^{−1} = 1 3· ⎡
⎢
⎢
⎣9 5 3 2 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎢
⎢
⎢
⎣3 5 31 2 3⎤
⎥
⎥
⎥
⎥
⎥
⎦  To show that our answer of X^{−1} truly is the inverse of X, we must show that it works. That is to say, X X^{−1} = I and X^{−1} X = I: when we multiply X and its inverse, we get the identity matrix (1's on the main diagonal, 0's everywhere else). Show what we get for X and X^{−1} multiplied together, done from both possible sides (since matrix multiplication gives different results based on which side the matrix multiplies from). [Note: If you're not currently comfortable with doing matrix multiplication, make sure to go watch the previous lesson that introduces matrices for the first time and explains how matrix multiplication works in detail. Understanding matrix multiplication is absolutely crucial to working with matrices.]
X X^{−1} ⎢
⎢X^{−1} X ⎡
⎢
⎢
⎣2 −5 −3 9 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎢
⎢
⎣3 5 31 2 3⎤
⎥
⎥
⎥
⎥
⎥
⎦⎢
⎢⎡
⎢
⎢
⎢
⎢
⎢
⎣3 5 31 2 3⎤
⎥
⎥
⎥
⎥
⎥
⎦⎡
⎢
⎢
⎣2 −5 −3 9 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎢
⎢
⎣2 ·3−5 ·1 2· 5 3− 5 · 2 3−3 ·3 + 9 ·1 −3· 5 3+ 9 · 2 3⎤
⎥
⎥
⎥
⎥
⎥
⎦⎢
⎢⎡
⎢
⎢
⎢
⎢
⎢
⎣3 ·2 + 5 3·(−3) 3·(−5) + 5 3·9 1 ·2+ 2 3·(−3) 1 ·(−5) + 2 3·9 ⎤
⎥
⎥
⎥
⎥
⎥
⎦
Great! They both come out to be I, the identity matrix, so we've shown that our inverse of X^{−1} works exactly like it should.⎡
⎢
⎢
⎣1 0 0 1 ⎤
⎥
⎥
⎦⎢
⎢⎡
⎢
⎢
⎣1 0 0 1 ⎤
⎥
⎥
⎦

 



 We can approach matrix equations very similarly to how we approach normal equations. For the matrix equation 2B=XA, we're looking to isolate the X on one side of the equation. The issue we must deal with is that X and the A are connected through matrix multiplication. Thus, we need something that can cancel out the A. To cancel out a matrix, we use its inverse. Since A A^{−1} = I, if we multiply both sides of the equation by A^{−1}, we will cancel out the A on the right side, leaving us with only X. (This works because I [the identity matrix] multiplied on any matrix has no effect. It is similar to multiplying any number by 1.) However, it is crucial to note that when we multiply by A^{−1} on both sides we must multiply by it on the right side. (This is because if we multiply on the left, it would "hit" the X instead of canceling out the A.) Because we multiply by A^{−1} on the right side for one half of the equation, we must multiply on the right side for both halves of the equation. If we multiply on different sides, the equation will no longer be equal, since matrix multiplication "cares" about which side it is applied on.
 With this in mind, we solve the equation as
2B = XA 2B ·A^{−1} = XA ·A^{−1}
Since we were told to find X as a matrix array (that is, a rectangular array with numbers inside), we now need to calculate the value of 2BA^{−1}.2BA^{−1} = X  Begin by finding A^{−1}. For a 2 ×2 matrix, the inverse of the matrix (if det(A) ≠ 0) is as follows:
Thus, working with the A for this problem, we findA^{−1} = 1 det (A) ⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦= 1 ad−bc⎡
⎢
⎢
⎣d −b −c a ⎤
⎥
⎥
⎦
then simplify:A^{−1} = 1 8 ·4 − 3 ·10⎡
⎢
⎢
⎣4 −3 −10 8 ⎤
⎥
⎥
⎦, A^{−1} = 1 2⎡
⎢
⎢
⎣4 −3 −10 8 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎢
⎣2 − 3 2−5 4 ⎤
⎥
⎥
⎥
⎦  We want to know the value of X in
and since we know both B and A^{−1}, we can plug in to find X.X = 2BA^{−1},
Apply the scalar multiple:X = 2 ⎡
⎢
⎢
⎣−5 3 −1 0 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎣2 − 3 2−5 4 ⎤
⎥
⎥
⎥
⎦
Then carry out the matrix multiplication. [If you're unfamiliar with matrix multiplication or find it particularly difficult, make sure to watch the previous lesson where it is explained in detail. Knowing how to do matrix multiplication is crucial to success in understanding matrices.]X = ⎡
⎢
⎢
⎣−10 6 −2 0 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎣2 − 3 2−5 4 ⎤
⎥
⎥
⎥
⎦
Then simplify to find the answer:X = ⎡
⎢
⎢
⎢
⎢
⎢
⎣−10 ·2 + 6 ·(−5) −10 ·(− 3 2)+6 ·4 −2 ·2 + 0 ·(−5) −2·(− 3 2) + 0 ·4 ⎤
⎥
⎥
⎥
⎥
⎥
⎦X = ⎡
⎢
⎢
⎣−50 39 −4 3 ⎤
⎥
⎥
⎦  Finally, after a problem as difficult and lengthy as this, it's a great idea to check your answer. Matrix work involves a lot of tiny calculations and steps, so it can be easy to make a mistake. Counter this by checking your answer. From the problem, we have
so if we plug everything into this, each side should come out the same.2B = XA, 2 ⎡
⎢
⎢
⎣−5 3 −1 0 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎣−50 39 −4 3 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎣8 3 10 4 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎣−10 6 −2 0 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎣−50 ·8 + 39 ·10 −50 ·3 + 39 ·4 −4 ·8 + 3 ·10 −4 ·3 + 3 ·4 ⎤
⎥
⎥
⎦⎡
⎢
⎢
⎣−10 6 −2 0 ⎤
⎥
⎥
⎦= ⎡
⎢
⎢
⎣−10 6 −2 0 ⎤
⎥
⎥
⎦

 




 


 



 To find the determinant of a matrix that is larger than 2×2, we must use minors and cofactors. Make sure to watch the lesson: it's much easier to understand this concept with a series of visual references. First, begin by choosing a horizontal or vertical line of entries from the matrix. For ease, let's just pick the top line to start with:
[Remember, absolute value bars around a matrix array means that we are taking its determinant, which is what we're doing in this case.]⎢
⎢
⎢
⎢
⎢3 2 0 −2 −3 5 7 4 1 ⎢
⎢
⎢
⎢
⎢  For each of the entries in the line we chose, we pull out the entry, and multiply it by the determinant of the minor that entry creates. The minor is the matrix you'd get if you eliminated all the entries that are horizontally and vertically in line with the entry the minor is built around. For example, the minor for the 3 in the topleft corner is 
. In addition, we must remember that when we pull out the entry, it becomes a cofactor, and the cofactors come with signs based on their location in the matrix. These signs are based on a checkerboard pattern of + and − as below:−3 5 4 1
Thus, the topleft 3 would get a +, the topmiddle 2 would get a −, and the topright 0 would get a +.⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣+ − + − … − + − + … + − + − … − + − + … : : : : ^{·}·_{·} ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦  Once we understand our cofactors and minors, we pull out each of the cofactors, multiply them by their associated minor, then sum it all up:
From before, we know how to take the determinant of a 2×2 matrix, it is3 · ⎢
⎢
⎢
⎢−3 5 4 1 ⎢
⎢
⎢
⎢−2 ⎢
⎢
⎢
⎢−2 5 7 1 ⎢
⎢
⎢
⎢+ 0 · ⎢
⎢
⎢
⎢−2 −3 7 4 ⎢
⎢
⎢
⎢
so going back to our determinant we get⎢
⎢
⎢
⎢a b c d ⎢
⎢
⎢
⎢= ad−bc, 3 ·(−3·1 − 5 ·4) −2(−2 ·1 − 5 ·7) + 0  Continue to simplify, and that's the determinant:
3 ·(−23)−2(−37) = −69 + 74 = 5


 


 



 Remember, absolute value bars around a matrix array means that we are taking its determinant. To take the determinant of this matrix, we will use the method of cofactors and minors. Make sure you've watched the video lesson where you can see this method carefully explained and worked through. Also do the previous problem to this one first, as it works through things more gradually. Begin by identifying which horizontal or vertical line of entries you want to use from the matrix. You can choose to use any of them, and because this line will give us our cofactors, it helps to choose a line with a lot of 0's, since they'll cancel things out later on. With this in mind, let's choose the middle vertical line:
⎢
⎢
⎢
⎢
⎢−8 0 4 −12 0 6 22 −4 17 ⎢
⎢
⎢
⎢
⎢  Pull these entries out as cofactors, and make sure you remember to apply the appropriate sign to each from the checkerboard pattern of signs:
Thus the top 0 gets a −, the middle 0 gets a +, and the bottom −4 gets a −. With this in mind, pull out the entries as cofactors and multiply their associated minors:⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣+ − + − … − + − + … + − + − … − + − + … : : : : ^{·}·_{·} ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦−0 · ⎢
⎢
⎢
⎢−12 6 22 17 ⎢
⎢
⎢
⎢+0 ⎢
⎢
⎢
⎢−8 4 22 17 ⎢
⎢
⎢
⎢− (−4) · ⎢
⎢
⎢
⎢−8 4 −12 6 ⎢
⎢
⎢
⎢  From there, simplify:
Remember, the determinant of a 2×2 matrix goes like this−0 · ⎢
⎢
⎢
⎢−12 6 22 17 ⎢
⎢
⎢
⎢+0 ⎢
⎢
⎢
⎢−8 4 22 17 ⎢
⎢
⎢
⎢− (−4) · ⎢
⎢
⎢
⎢−8 4 −12 6 ⎢
⎢
⎢
⎢= 4 · ⎢
⎢
⎢
⎢−8 4 −12 6 ⎢
⎢
⎢
⎢
so continuing to simplify, we get⎢
⎢
⎢
⎢a b c d ⎢
⎢
⎢
⎢= ad−bc, 4 · ⎢
⎢
⎢
⎢−8 4 −12 6 ⎢
⎢
⎢
⎢= 4 (−8 ·6 − 4 ·(−12) ) = 4 (0) = 0



 



 



 




 To take the determinant of this matrix, we will use the method of cofactors and minors. Make sure you've watched the video lesson where you can see this method carefully explained and worked through. Also do the previous two problems before this one, as they ramp up in difficulty, and this is fairly hard. Begin by identifying which horizontal or vertical line of entries you want to use from the matrix. You can use any of them, so since this will give us our cofactors, it helps to choose lines with a lot of 0's, since they'll cancel things out later on. With this in mind, let's choose the second horizontal line:
⎢
⎢
⎢
⎢
⎢
⎢
⎢1 −3 0 2 0 6 0 −3 3 11 4 −1 0 4 −2 5 ⎢
⎢
⎢
⎢
⎢
⎢
⎢  From there, we pull cofactors and minors. Make sure to apply the appropriate sign based on the location compared to our "sign checker board":
For ease, we can immediately eliminate the minors attached to the 0 cofactors (since they will be reduced to 0 by multiplication), and so we won't even write them out:⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣+ − + − … − + − + … + − + − … − + − + … : : : : ^{·}·_{·} ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦
Thus, so far we have shown−0 +6 · ⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢− 0 + (−3) · ⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢det (A) = 6 · ⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢−3 · ⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢  At this point, we now need to find the determinants of each of those 3 ×3 matrices, so we'll tackle them one at a time. Using the top horizontal line for cofactors works fine for both, so we will do so.
Then take the 2×2 determinants and simplify:⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢= 1 · ⎢
⎢
⎢
⎢4 −1 −2 5 ⎢
⎢
⎢
⎢−0 + 2 · ⎢
⎢
⎢
⎢3 4 0 −2 ⎢
⎢
⎢
⎢
Thus, we have shown1·(4·5 − (−1) ·(−2)) + 2 ·(3 ·(−2) + 4 ·0) = 18 + 2 (−6) = 6 ⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢= 6  We do the same process with the other 3×3 matrix:
Then take the 2×2 determinants and simplify:⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢= 1 · ⎢
⎢
⎢
⎢11 4 4 −2 ⎢
⎢
⎢
⎢−(−3) · ⎢
⎢
⎢
⎢3 4 0 −2 ⎢
⎢
⎢
⎢+0
Thus, we have shown:(11·(−2)−4·4) + 3 (3 ·(−2) − 4 ·0) = −38 + 3 (−6) = −56 ⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢= −56  To summarize, we have found:
We know⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢= 6 ⎢
⎢⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢= −56
so we plug in to find det(A):det (A) = 6 · ⎢
⎢
⎢
⎢
⎢1 0 2 3 4 −1 0 −2 5 ⎢
⎢
⎢
⎢
⎢−3 · ⎢
⎢
⎢
⎢
⎢1 −3 0 3 11 4 0 4 −2 ⎢
⎢
⎢
⎢
⎢, det (A) = 6 ·(6) − 3·(−56) = 36 + 168 = 204


 


 



 Note: The method to find matrix inverses that are larger than 2×2 requires you to be familiar with augmented matrices, row operations, and GaussJordan Elimination. Make sure you already know all of these things, which can be found at the beginning of the next video lesson. Furthermore, make sure you have watched the final portion of the video for the current lesson you are on (Determinants and Inverses of Matrices) as it explains how the method is used and gives a simple example.
 For an n×n matrix A (whose determinant is not 0), we find the inverse by first creating an augmented matrix with the identity matrix:
Then, through the process of GaussJoran elimination and by using row operations, we make the left half of the augmented matrix I_{n}, and we end up with⎡
⎣A I_{n} ⎤
⎦
where the inverse matrix has appeared on the right side.⎡
⎣I_{n} A^{−1} ⎤
⎦,  Following this method, begin by turning A into an augmented matrix with I_{n} on the right side:
⎡
⎢
⎢
⎢
⎣1 2 −4 1 3 −2 −2 0 12 ⎤
⎥
⎥
⎥
⎦⇒ ⎡
⎢
⎢
⎢
⎣1 2 −4 1 0 0 1 3 −2 0 1 0 −2 0 12 0 0 1 ⎤
⎥
⎥
⎥
⎦  Now that we have an augmented matrix, we begin to apply row operations through GaussJordan elimination. To begin with, below the main diagonal we cancel out to 0's and put the main diagonal as 1's:
⎡
⎢
⎢
⎢
⎣1 2 −4 1 0 0 1 3 −2 0 1 0 −2 0 12 0 0 1 ⎤
⎥
⎥
⎥
⎦−R_{1} + R_{2} → 2R_{1} + R_{3} → ⎡
⎢
⎢
⎢
⎣1 2 −4 1 0 0 0 1 2 −1 1 0 0 4 4 2 0 1 ⎤
⎥
⎥
⎥
⎦−4R_{2} + R_{3} → ⎡
⎢
⎢
⎢
⎣1 2 −4 1 0 0 0 1 2 −1 1 0 0 0 −4 6 −4 1 ⎤
⎥
⎥
⎥
⎦− 1 4·R_{3} → ⎡
⎢
⎢
⎢
⎢
⎢
⎣1 2 −4 1 0 0 0 1 2 −1 1 0 0 0 1 − 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎦  From there, we now cancel above the main diagonal to 0's, working our way back up:
⎡
⎢
⎢
⎢
⎢
⎢
⎣1 2 −4 1 0 0 0 1 2 −1 1 0 0 0 1 − 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎦4R_{3}+R_{1} → −2R_{3}+R_{2} → ⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣1 2 0 −5 4 −1 0 1 0 2 −1 1 20 0 1 − 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦−2R_{2}+R_{1} ⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣1 0 0 −9 6 −2 0 1 0 2 −1 1 20 0 1 − 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦  At this point, our augmented matrix now has an identity matrix on the left side, so the right side is the inverse to our original matrix:
After this much effort, it's a good idea to check our work, so let's make sure that A A^{−1} comes out to be the identity matrix, like it should:A^{−1} = ⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣−9 6 −2 2 −1 1 2− 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦A A^{−1} = ⎡
⎢
⎢
⎢
⎣1 2 −4 1 3 −2 −2 0 12 ⎤
⎥
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎣−9 6 −2 2 −1 1 2− 3 21 − 1 4⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎢
⎢
⎢
⎢
⎣1·(−9) + 2 ·2 −4 ·(− 3 2) 1 ·6 + 2 ·(−1) −4 ·1 1 ·(−2) + 2 · 1 2− 4 ·(− 1 4) 1·(−9) + 3 ·2 −2 ·(− 3 2) 1 ·6 + 3 ·(−1) −2 ·1 1 ·(−2) + 3 · 1 2− 2 ·(− 1 4) −2·(−9) + 0 ·2 +12 ·(− 3 2) −2 ·6 + 0 ·(−1) +12 ·1 −2 ·(−2) + 0 · 1 2+12 ·(− 1 4) ⎤
⎥
⎥
⎥
⎥
⎥
⎥
⎥
⎦⎡
⎢
⎢
⎢
⎣1 0 0 0 1 0 0 0 1 ⎤
⎥
⎥
⎥
⎦


 


 



*These practice questions are only helpful when you work on them offline on a piece of paper and then use the solution steps function to check your answer.
Answer
Determinants & Inverses of Matrices
Lecture Slides are screencaptured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.
 Intro
 Introduction
 Not All Matrices Are Invertible
 Determinant
 The Determinant is a Real Number Associated With a Square Matrix
 If the Determinant of a Matrix is Nonzero, the Matrix is Invertible
 Determinant of a 2 x 2 Matrix
 Minors and Cofactors  Minors
 Minors and Cofactors  Cofactors
 Determinant of Larger Matrices
 Alternative Method for 3x3 Matrices
 Inverse of a 2 x 2 Matrix
 Inverse of Larger Matrices
 Using Inverse Matrices
 Example 1
 Example 2
 Example 3
 Example 4
 Finding the Inverse of Larger Matrices
 General Inverse Method  Step 1
 General Inverse Method  Step 2
 General Inverse Method  Step 3
 Intro 0:00
 Introduction 0:06
 Not All Matrices Are Invertible 1:30
 What Must a Matrix Have to Be Invertible?
 Determinant 2:32
 The Determinant is a Real Number Associated With a Square Matrix
 If the Determinant of a Matrix is Nonzero, the Matrix is Invertible
 Determinant of a 2 x 2 Matrix 4:34
 Think in Terms of Diagonals
 Minors and Cofactors  Minors 6:24
 Example
 Minors and Cofactors  Cofactors 8:00
 Cofactor is Closely Based on the Minor
 Alternating Sign Pattern
 Determinant of Larger Matrices 10:56
 Example
 Alternative Method for 3x3 Matrices 16:46
 Not Recommended
 Inverse of a 2 x 2 Matrix 19:02
 Inverse of Larger Matrices 20:00
 Using Inverse Matrices 21:06
 When Multiplied Together, They Create the Identity Matrix
 Example 1 23:45
 Example 2 27:21
 Example 3 32:49
 Example 4 36:27
 Finding the Inverse of Larger Matrices 41:59
 General Inverse Method  Step 1 43:25
 General Inverse Method  Step 2 43:27
 General Inverse Method  Step 2, cont.
 General Inverse Method  Step 3 45:15
Precalculus with Limits Online Course
Transcription: Determinants & Inverses of Matrices
Hiwelcome back to Educator.com.0000
Today, we are going to talk about determinants and the inverses of matrices.0002
Consider if we wanted to find x in the equation 5x = 10pretty basic algebra, right?0006
We would cancel out the 5 by dividing it on both sides.0012
Or equivalently, we could think of this as multiplying by 5 inverse, which is just 1/5.0014
If we multiply by 1/5 on both sides, we cancel out the 5, because the multiplicative inverse to 5 is 1/5; that why it is 5^{1}.0020
What if we wanted to solve for the matrix X in the equation below?0028
We had some matrix A, times the matrix X, is equal to the matrix B.0031
We have this matrix equation; so we need to somehow cancel out A to get X alone.0036
It is the same basic idea; we just need to cancel out an entire matrix.0041
So, we need to multiply both sides by the inverse to A; this means we need to find the inverse to A.0044
If we can find this magical inverse, then we could multiply both sides.0050
We would have A^{1}AX and A^{1}B.0054
Well, the A^{1} and the A will cancel each other out, and we would be left with X = A^{1}B.0058
So, we would be able to solve for that matrix, that unknown matrix, X, if we wanted to,0064
in terms of this A^{1} and B, if we know what A and B are.0068
It is very similar to 5x = 10; we multiply by the multiplicative inverse of 5, 5^{1}, on both sides, to get what x is.0072
So, AX = B...we multiply by the multiplicative inverse of A on both sides to get that X alone.0079
Not all matrices are invertible; consider if we wanted to solve for X in the basic equation 0x = 0.0086
It would be impossible: the information about what x is has just been destroyed by that 0.0094
0 multiplied by anything is going to come out to be 0, so we don't have any idea what that x is anymore.0099
There is no way to cancel out 0, because 0^{1} does not exist.0104
There are some special things out there that we can't invert.0109
There is no way to flip them to an inverse, because 0...you can't invert it.0112
You can't reverse the process of multiplying by 0; it is gonethe information is lost.0117
It is the same thing going for matrices: not all matrices can be inverted.0123
A matrix that can be is called invertible: if we can invert a matrix, we call it invertible, or we might call it nonsingular.0127
If a matrix cannot be inverted, it is called singular.0134
To be invertible, a matrix must have two properties: the matrix must be squareit has to be a square matrix to invert;0138
and the determinant of the matrix must be nonzero.0145
So, what is a determinant? Let's start talking about determinants.0149
The determinant is a real number associated with a square matrix.0152
The determinant of a matrix A is denoted by either detA (like determinant of Awe are shortening it),0156
or vertical bars on either side of the matrix A.0163
Now, A may look similar to absolute value, but it is not; it is not absolute valueit is the determinant of A.0165
So, when it is vertical bars around a matrix, we are talking about determinant, not absolute value.0172
So, vertical bars around a matrix, unlike absolute value, can produce any real number, including negative numbers or 0 or positive numbers.0176
So, it is not limited to just giving out positive or 0, like absolute value; it is allowed to put out anything.0186
So, don't get confused by those vertical bars, thinking that that implies positiveness; it doesn't.0191
For the most part, though, I prefer this detA thing, this determinant of A; so that is the form that we will be seeing.0195
But occasionally, you will see it with the vertical bars, instead.0202
The determinant of a matrix has many important applications and properties.0204
There is a huge amount of stuff that this determinant is useful for.0207
But we are not going to get into that in this course.0211
In this course, we are only going to concern ourselves with one thing: whether or not a matrix is invertible, and the fact that a determinant tells us that.0213
If a determinant of a matrix is nonzero, then the matrix is invertible, and vice versa.0220
So, if the determinant of A is not equal to 0, then we know that A is invertible.0228
And if A is invertible, then we know that the determinant of A must not be equal to 0.0232
On the flip side, if the determinant of A is equal to 0, then we know that A is not invertible.0236
And if A is not invertible, we know that the determinant of A is equal to 0.0241
So, just remember that detA not equal to 0 means that it is invertible.0245
And that really works a lot like we are used to with the real numbers.0249
You can invert any number you want, except 0.0253
It is the same thing with matrices: you can invert any matrix you want, except for ones that have determinant 0.0256
All right, so think in terms of that: detA not 0 means invertibleyou are allowed to invert; detA = 0you are not allowed to invert.0261
So, let's see the determinant of a 2 x 2 matrix: if A = a, b, c, d, it is given by detA,0271
which is equal to this other way to write determinant of A, comes out to be ad  bc.0279
A good mnemonic to remember this is to think in terms of diagonals0286
the down diagonal, ad, multiplied together, and then subtracted by this up diagonal here, cb or bc, so minus bc.0289
We subtract by that up diagonal.0303
Let's look at an examplelet's do an example here: Multiply...0305
if we want to take the determinant of 5, 9, 3, 4, notice that we have these bars on either side.0309
If we have bars of some matrix inside, what that is saying is to take the determinant of that stuff on the inside.0315
Bars on either side is just like the bars on either side of the capital letter denoting the matrix.0326
It says to take the determinant of whatever is inside of there.0332
So, you will see that notation a lot; but when we are talking about just letters, I prefer that one.0334
OK, in either case, if we are taking the determinant of the matrix 5, 9, 3, 4if we are taking this one right here,0339
the determinant of 5, 9, 3, 4, the first thing we do is take the down diagonal.0344
So, it is going to be 5 times 4; and then, it is going to be minus the up diagonal, 3 times 9, so 9 times 3.0351
5 times 4  9 times 3; we get 20  27, and that comes out to be 7.0361
Once again, the determinant can come out to be any number; it doesn't have to come out to a positive;0372
it just has to come out to any real number at all.0376
Minors and cofactors: first we are going to talk about minors.0380
Before we can look at determinants of larger matrices, we will need two concepts: minors and cofactors.0383
First, we are going to look at minors.0388
For a square matrix A, the minor, m_{i,j} (remember, i is the row i; j is the column j)0391
of the entry a_{i,j} is the determinant of the matrix obtained by deleting the i^{th} row and j^{th} column.0398
So, we go to this i,j location, this a_{i,j} entry, and we delete out from that, vertically and horizontally.0405
So, we will take some location, and then we will delete out horizontally, delete out vertically, and group back together and see what is left.0414
For example, if we have a below, we would have m_{2,3}; 2,3 means we are on the second row, and we are going to be on the third column.0421
We are looking at 8 as the epicenter of where this thing is.0431
That is the entry a_{i,j}; so the entry 2,3 would be 8.0436
Now, we delete (the determinant of the matrix obtained by deleting) the i^{th} row and j^{th} column.0440
We delete this second row; we delete this third column; and we see what the matrix is that is left.0446
Well, the matrix that is left is 6, 2, 7, 3; that is all that hasn't been crossed out.0453
Now, we go and we take the determinant of that; we are taking the determinant with these bars,0461
because the minor is that you delete, and then you take the determinant.0466
So then, we just take 6 times 3, minus 7 times 2; 18 + 14...we get 32, so that is our minor.0469
Cofactor is very closely based on the minor.0480
The cofactor just multiplies the minor by 1 or 1, based on the location of the entry the minor comes from.0484
So, there is this shifting, flippingbackandforth pattern of positive/negative that is really deeply connected to the determinants of matrices.0491
The cofactor c_{i,j}, the i^{th} row, j^{th} column cofactor, of the entry a_{i,j},0500
the entry in the i^{th} row, j^{th} column of our matrix A, is given by c_{i,j}0505
is equal to 1 to the i + j times that minor i,j.0511
So, the 1 to the i + j is just a way of saying if it is going to be positive or negative.0517
1 to the 0 is positive; 1 to the 1 is negative; 1 to the 2 is positive; 1 to the 3 is negative; 1 to the 4 is positive.0521
1 to the even number is positive; 1 to the odd number is negative.0529
So, we can see this as an alternating sine pattern.0533
If we are in 1, to the row 1 + column 1, then that is going to be 1 squared; 1 squared comes out to be positive 1.0535
There we are at row 1, column 1.0546
If we were to instead, say, look at row 2, column 3, then it would be 1 to the 2 + 3, which is equal to 1 to the 5.0549
So, since it is to an odd number, it is going to be negative; so we get that negative there.0561
We can see this in terms of the i + j thing; but we can also see it in terms of this alternating sign pattern.0566
I would recommend, any time you are working with cofactors, that you just draw up the alternating sign factor to whatever size you are doing.0572
For example, if you are working with a 3 x 3, just draw out a 3 x 3 alternating sign pattern.0578
It always starts with a positive in the top left: so +  +,  + , +  +.0584
And then, from there, you will be able to work from it and use that as a reference point; we will see that in the examples.0593
Thus, based on our previous example, when we took what m_{2,3} was (m_{2,3} was equal to0598
the determinant of 6, 2, 7, 3, because c_{2,3} is still going to be based around row 2, column 3;0605
so 8...cross out...cross out...6, 2, 7, 3...the same thing here; and then we just take the determinant of that);0612
but we are here in the 2,3 position in our alternating sign pattern (or alternately, if we want to look at it0621
in terms of 1 to the i + jeither way would end up working out the same); so we have this negative here,0629
so we have a negative showing up here, so that will end up coming out to 32,0636
because we already figured out that the determinant for that minor is 6, 2, 7, 3; that is what we get out of that.0641
And so, that came out to be positive 32; so when we have this sign on top of that, that is going to come out to be 32.0648
All right, so how do we actually take the determinant?0656
Let's apply this stuff: the determinant of an m x n matrix A is given by the sum of the entries in any row or column0657
(you can choose any row or any column at all), and you multiply each one of those entries0665
by the respective cofactor that would come out of that entry.0670
So, the determinant of A, which is equal to another way to say the determinant of A,0674
is equal to...say we chose the k^{th} row; then we would have a_{k,1},0677
the first entry in the k^{th} row, times the cofactor of the k^{th} row, first entry,0681
plus a_{k,2}, the k^{th} row, second entry, times the cofactor for the k^{th} row, second entry,0687
up until the k^{th} row, n^{th} entry, and k^{th} row, n^{th} entry cofactor.0694
Similarly, we could have also done this with columns; it would be the first entry, k^{th} column of A,0701
times the cofactor for the first entry, k^{th} column; or the second entry, k^{th} column,0706
with the cofactor of second entry, k^{th} column, up until the n^{th} entry, k^{th} column,0711
n^{th} entry, k^{th} column cofactor.0715
So, that is how it works; don't worrywe will see an example that will make this make a lot more sense.0718
Note that this is true for any value of k, as long as 1 ≤ k ≤ n.0722
So, our k has to be somewhere in these m x n; we can't choose a row that is beyond the dimension,0728
or a column that is beyond the size, of our matrix; that doesn't make sense.0733
But as long as we choose a row that is inside of our matrix, and a column that is inside of our matrix, we can choose any one at all.0737
So, this process can be done with any row or any column, and you will end up getting the exact same resultkind of amazing.0742
We won't see why, but it is pretty cool.0748
This usually means that it is in our interest to choose the row or column that has the most zeroes,0750
because it is really easy: 0 times a cofactorwe don't have to worry about what the cofactor is.0755
It is just immediately going to eliminate itself.0761
So, the thing with the most zeroes, the row or column that has the most zeroes (or the smallest numbers,0763
if we don't have that many zeroes) will help make calculation easier; so that is something to stay on the lookout for.0768
All right, determinant of larger matrices: let's actually put "rubber to the road" and see how this works.0775
First, we notice that there is a 0 here; I like going horizontally, so let's work out this way.0782
Now, notice: a 3 x 3 sign pattern (put it inside of vertical lines, just so we are reminded that we are doing a determinant)0787
is going to look like this: so let's work on this horizontal line here.0802
The first entry in this row is 1; we then go out; we cross out the things on a line with that.0809
That would bring us to the entry 1, times the sign for that cofactor, so 1, times the minor, 2, 3, 3, 5.0819
Next, it is going to be a +; our next one in the row is going to be the 0.0836
We cut out...we don't even really have to care about the cutting out, because 0 times whatever0843
we end up having inside for that minorthat is going to get knocked out, so it doesn't really matter.0849
That is the beauty of choosing the 0.0853
Next, we have the 8; so 8 knocks out what is there; 8, and we are on this one, so  8, times the minor0855
that is produced by cutting around that 8, cutting a vertical and a horizontal on that 8: 6, 2, 7, 3.0867
We work these out; we have 1 times...down diagonal, 2 times 5, minus up diagonal; 10  9 becomes 1.0876
Minus, plus...so that becomes + 8 times...6 times 3 becomes 18, minus...7 times 2 is 14; that cancels out.0889
So, we have 1, negative and negative; that becomes positive 1...0904
Oh, sorry, that did not become negative back here: 2 times 5 is 10, minus 3 times 3 is 9, so we have 10  9 is 1; sorry about that.0911
So, that should have been a 1; here is a 1, so this comes out to be 1; it does not cancel out; I'm sorry about that.0921
Then, + 8 times...18 + 14 becomes 32, so 1 +...8 times 32 is 256; so we end up getting 255 as the determinant for this matrix.0928
Alternatively, we could have chosen a different row or a different column.0946
For example, we could have just gone along the top, like this, and we would have had 6 times...0949
and it would be positive, if we are going along the top there...so 6 times...we cross out around it; 0, 8, 3, 5.0955
And then, the next one is minus, 2, times...the minor around that 2 here would cross out to be 1, 8, 7, 5.0964
And then finally, + (because it is a plus in our signs) 3 times 1, 0, 7, 3.0976
You can work it out that way, as well, and you would end up getting 255, as well.0985
I like this row here, because we had that 0; and so, it just managed to knock itself out, right from the beginning.0989
That is that much less calculation for us to have to deal with; I think that is niceless calculation makes it easier.0995
All right, there is an alternate method for finding the determinant of a 3 x 3 matrix that some people teach.1001
Personally, I want to recommend against using this methodI don't really think there is a good reason to use it.1008
The method we just did, that method with the cofactor expansion, while it seems a little complex at first1014
(it is a lot of things going on) will work for any size matrix at all.1019
And to be honest, this alternate method doesn't actually go any faster, I don't think.1023
So, I would say to try to stick to the cofactor method; I think it works better in general.1029
It gives you the ability to cancel out a whole bunch of zeroes, if you see a bunch of zeroes.1034
And you can use that same method for any size matrix and work down to smaller things.1038
That said, you might have to know it for class, or you might just really want to use it.1043
So, if you must know it, here it is.1046
The first thing you do: you begin by taking the first two columns of the matrix, and you repeat them on the right of the array.1049
So, we have 6, 2, 3, 1, 0, 8, 7, 3, 5; that shows up here, just like normal.1054
But then, we take the first two columns, and then we also repeat this on the right side.1062
So now, we have this extralarge array of numbers.1069
Once we have that array of numbers, we can work with it.1073
We multiply each red down diagonalwe multiply these together, and we add them up.1076
In this case, we would have 6 times 0 times 5; 2 times 8 times 7; and 3 times 1 times 3; that is what we get out of there.1082
And then, we subtract by each of the up diagonals, those blue ones, multiplied together; you subtract by those.1091
Minus (it is always going to be minus), and then 7 times 0 times 3, and then minus1098
(we are subtracting again) 3 times 8 times 6, and then minus 5 times 1 times 2.1105
You work that all out and do a bunch of calculation; you end up getting the exact same number, 255.1112
So, it is an alternate way to find the determinant; it will work if you have a 3 x 3 matrix.1116
It is not that bad; but I don't really think there is a whole lot of reason to use it.1121
It doesn't really go that much faster; you basically have to deal with the same amount of arithmetic.1125
And it is a very specific trick for something that you might have to do on a larger scale, and you can't use that trick anymore.1129
So, I would recommend using the method we were just talking about, with cofactors and minors.1135
But if you really want to use this one, here it is.1139
All right, we are ready to finally see the inverse of a 2 x 2 matrix.1142
So, if we have some 2 x 2 matrix, A = a, b, c, d; then the inverse of A, assuming that the determinant of A is not equal to 0,1145
(if the determinant of A is equal to 0, then we can't invert it at all), then A^{1} = 1/ad  bc, times the matrix d, b, c, a.1152
So, notice: what we have done there is flipped the location of the diagonal here, and then we put negatives on the b and the c.1168
That is what we are getting here and here and here and here.1176
That is one way of looking at what is going on.1181
Equivalently, you could also write this as 1/detA, because the determinant of A is just ad  bc.1183
So, detA is the exact same thing; and then we are going to end up having the same matrix here and here.1190
That is another way to think about it and remember it; that might be a little bit easier.1195
All right, for the most part, at this level of this course or any similar math class,1199
you are probably not going to need to compute the inverse of a matrix that is any larger than a 2 x 2.1203
You are almost certainly not going to need to do that by hand.1208
But your teacher might want you to; you might just be curious about it.1211
So, if for some reason you need to calculate the inverse of a matrix that is larger than a 2 x 2 matrix,1214
and you have to do it by hand, we will go over a method for this after the examples.1219
We will talk about that after the examples; we will see something for doing that.1223
There is...notice, I said "by hand"; it turns out that if you have a graphing calculator (or access to the Internet),1227
you can actually just plug in matrices and have other computers invert them for you.1233
It is a very useful thing, because the arithmetic of it is very simple, but tedious, and there is a lot of arithmetic.1238
So, we will talk about that a little bit more in the next lesson.1244
Or we will talk about how there are calculators and matrices interacting together.1247
But that is something to think about, if you have to take the inverse of a matrix that is really large;1250
but you can not do it by handyou are not required to show all of your work by handyou might want to just use a calculator.1255
That is something to think about.1262
All right, how do you use inverse matrices?1264
If you have some A and A^{1}, then we know that A^{1} times A times B equals B.1266
A^{1} and A cancel each other out, and they have no net effect.1272
This is because A^{1} times A equals the identity matrix, which is equal to A times A^{1}.1276
So, if you have the inverse to a matrix, you can multiply on the left side or the right side, and it will create the identity matrix.1281
It creates the identity matrix I, which as we noted in the previous lesson has no effect in multiplication.1287
A^{1}A up here becomes I; and then I times Bwell, the identity matrix times anything becomes just what we already had.1294
So, we get B; so that is why A^{1} and A are cancelling out.1301
They turn into the identity matrix, and then that just doesn't do anything.1304
I want you to notice that we can multiply from the left side or the right side.1307
It doesn't matter; it will cancel out in either direction.1311
That is one of the nice things about inverses; they actually will commute, unlike pretty much everything else with matrices.1313
It is important to note that, if we multiply an equation by a matrix on both sides, we have to choose a direction to multiply from1319
and do the same for both parts of the equation.1326
So, if we multiply from the left, we have to multiply from the left on both sides.1329
If we multiply from the right, we have to multiply from the right on both sides.1333
This is because pq is not equal to qp, in general.1336
Multiplying on the left by p is generally very different than multiplying on the right by p.1340
So, if we are going to keep up equality, we have to do the same action; we have to multiply from the left on both sides,1344
because multiplying from different sides is actually a different action with matrices.1349
So, you have to make sure that you multiply from the same side if you want to keep the equality of the equations.1353
So, for example, if we have that A = B, then we can have CA = CB, where we multiply on the left for both sides.1358
Or we could have AC = BC, where we multiply on the right for both sides.1366
But usually, in general, CA is not going to be equal to BC, where we multiply on the left for one, and we multiply on the right for the other.1372
It is in general not going to end up being true; so you will have lost your equality.1380
So, make sure you notice that sort of thing; be careful hereit is dangerous.1384
It is really easy to make this mistake, because so often, when we think about multiplying numbers and equations,1390
like x = 10...we might multiply 3x = 10 times 3, but that is not how it can work in matrices.1395
The only reason we can get away with that in a normal equation is because they commute, so it doesn't matter which side we multiply from.1400
But with matrices, it matters which side we multiply from; so we can't have CA = BC; we have to make sure it is either CA = CB or AC = BC.1408
We have to make sure that we are multiplying both on the left or both on the right.1417
All right, we are ready for some examples.1421
What is the determinant of this 3 x 3 matrix? 2, 1, 3, 4, 2, 0, 1, 0, 1.1423
Our very first thing that we want to do is make a sign marker, just so we can see where all of the signs show up.1429
So, at this point, we need to choose some row or some column to work with.1440
We could choose the top one; that would be fine, but it doesn't have any 0's in it.1446
It has some numbers that are larger than that; so I like this one, because it has 1, 0, and 1.1449
So, one of them is going to cancel out, and the other ones have very little effect on the numbers.1454
Let's work with that: 1 will cancel out those; so we have 1 times 1, 3, 2, 0.1458
Then, the next one...it is still that, because that corresponds to that sign right there...1472
Next, we have minus, because it corresponds to that one, 0, times...and we could figure out what this is,1480
but it doesn't matter; because it is 0, it is going to knock itself out automatically.1490
0 times anything is going to come out as 0, so we don't even have to worry about computing it.1494
And then finally, the 1: that will knock out these, so we have a + here, + 1, times 2, 1, 4, 2.1498
We calculate this; we have 1 times...1 times 0 is 0; 2 times 3 is 6; but it is minus that;1512
so 1 times 0 is 0; minus 2 times 3, so it is a total of +6.1521
And then, plus...1 times...just figure out what this is...2 times 2 is 4; minus 4 times 1, another 4; so we have a total of 8.1529
We work this out; we have 6  8; and we get 14.1540
There are many ways to have done this; we could have also chosen to do this based on this column here.1547
Really quickly, we would have had 3, since we are starting here.1551
We start at positive, but it starts at 3; so 3 times 4, 2, 1, 0,1557
minus...our next sign...0 times...we don't even have to care about it, because it will just knock itself out... plus 1 times 2, 1, 4, 2.1564
Or we could have gone from a different place entirely.1576
We could have also had this, and this would be equal; all of these ways will end up coming out to be the exact same thing.1579
That is one of the cool properties of the determinant.1583
2 times 2, 0, 0, 1, minus 1 times 4, 0, 1, 1, plus 3 times 4, 2, 1, 0.1587
There are many different ways to do this: this here is the same as this here, is the same as this here.1606
They all end up being equal to 14; so the question of how we want to approach this1614
which row, which columnwe just choose whichever one seems easiest to us.1620
And even if we end up choosing the wrong onewe choose one that is slightly harder1624
it doesn't matter, because they all come out to be the same thing.1627
We might have to do a few more extra arithmetic steps, but in the end, we will still get the same answer; so it is OK.1629
You don't have to really worry about that.1634
All right, what is this one? We have a 4 x 4, so at this point, we have to take the determinant of this.1636
The first thing we want to do is get a nice sign grid, so we can see all of our plusses and minuses.1641
+  +...always a positive in the top left... +  +, +  + ,  +  +; great.1646
So, at this point we want to figure out which is our best row or column to choose.1656
I see two zeroes on this column; so to me, that looks like it is going to make it easiest; I am going to go with that one.1660
I have the 2; it crosses out these; that corresponds to this +1 here, so I just have 2 times...1666
I cross out those other ones; I am left with 1, 3, 0, 4, 5, 4, 1, 1, 0.1676
OK, and then 0 here and the 0 here...we don't even have to worry about them,1684
because they are just going to multiply out to cancel out entirely.1689
So, we only get to having to worry about the 3; that leaves us here.1692
So, it is minus 3 times what gets crossed out: 3 times 2, 1, 3, 0, 4, 5, 3, 1, 1.1695
OK, at this point, let's figure out, of these new ones, which ones we want to use.1714
Let's make a new, smaller, 3 x 3 sign grid, so we can think in terms of that now.1719
OK, so this one...what seems easiest to me is this column...and I would say this row here.1726
We will work with those: we have 2 times whatever the determinant of that larger 3 x 3 is (this one right here);1732
we are working with the 0, so the 0 is going to just knock things out;1741
the only one that we really have to care about is this 4; it will be 4 times...1744
oh, wait, 4 here is there; so we have a 4; we always have to pay attention to that cofactor1750
bringing either a plus or a negative; that is why we make these sign grids here and here.1755
So, we have to pay attention to cofactors.1760
4 times...that would cross out these things, so...1, 3, 1, 1.1762
And then, over here, minus 3; so we chose this one, so we are going to have this row starting here: 3 times 0...1773
you don't have to worry about that one; plus...4 times...it crosses out the other ones1782
that it is horizontal and vertical on...2, 3, 3, 1 is what is left there;1791
And then, minus 5...it crosses out, and we get 2, 1, 3, 1.1799
All right, we start working these out; since they are 2 x 2 matrices, we can just work them out now.1812
So, we have 2 times 4 times...1 times 1 is 1, minus 1 times 3 is 4.1816
Then, minus 3 times 4 times 2 times 1 (is 2), minus 3 times 3; so 2  9 gets +11.1826
2  3(3)...we have 9...so 4 times 11, minus 5 times...2 times 1 is 2, minus 3(1)...so 2 here, and then minus 3...1846
3 times 1 becomes positive 3, but we are subtracting by that, so it is 2 minus 1...2 minus 3...so we get 1.1868
OK, so keep working that out: 2 times 4 times 4 is going to come out to be 2 times +16...1882
minus 3...4 times 11 is 44; these cancel out, and we get + 5; 2 times 16 is 32, minus 3...44 + 5 is 39.1893
These negatives cancel out; at this point we have this equal to 32 + 3(39) is going to be the same as 3(40)  3, so + 117.1915
32 + 117 comes out to be 149; so the determinant of our matrix is equal to 149.1929
Great; so by carefully choosing which row we decide to work with, we can make this a whole lot easier.1942
By choosing that third row down, we were able to get a 0 to show here and a 0 to show here,1947
which allowed us to cancel out all of the things, so we only had to figure out two 3 x 3 determinants,1953
which is a lot easier than having to figure out four of them or moreanything like that.1957
So, by carefully choosing the row or column that you do your cofactor expansion on, you can make things a lot easier on yourself.1961
The third example: Prove that, for any 2 x 2 matrix A, where the detA is not equal to 0,1967
then A^{1} = 1/(ad  bc) times the matrix d, b, c, a.1972
One thing that should be written here is that A is going to be equal to our standard form for just writing a general one, a, b, c, d.1977
So, how would we prove this? Well, we just prove it by showing that A times this supposed A^{1}1985
does, indeed, come out to be the identity matrix, because that is what it means to be the inverse.1991
That is that something times its inverse comes out to be the identity matrix.1995
Some matrix times its inverse matrix comes out to be the identity matrix.1999
That is what it means to be an inverse for matrices.2002
So, let's just check that: let's say A^{1} times A.2005
We don't know for sure that it actually is going to turn out to be the inverse, but let's try it.2011
We were told that the detA is not equal to 0; it is the determinant of A...2015
Well, remember: if this is our A right here, then the determinant of A is going to be equal to ad  bc.2019
This would be our only worry in creating this A^{1}: 1/(ad  bc)if it is dividing by 0, everything blows up.2026
But since we are told that the determinant of A (which is equal to ad  bc) is not equal to 0,2033
we know that we don't have to worry about dividing by 0, so we can move on.2037
A^{1} times A: we have 1/(ad  bc), times the matrix d, b, c, a.2040
And then, times A is a, b, c, d...so first, we work through with matrix multiplication.2053
We have our 1/(ad  bc); we will scale later; right now, it will be easier to just work with just the variables, without that fraction getting in the way.2063
So, the first column: we know we will get out to a 2 x 2 matrix in the end; so first row times first column:2074
d times a...actually, let's expand this even more...minus b times c; great.2083
The next one: d times b, minus b times d.2093
The second row on the first column now: c,a on a,c; c on a gets us ca; a on c gets us + ac.2102
The last one: c,a on b,d gets us cb + ad.2111
So, we see this; and we do a little bit of simplification, moving things around.2119
Well, db  bd...since b and d are just real numbers, they are commutative, so db  bd just cancel each other out.2124
ca + ac: once again, they knock each other out.2134
We can rearrange things a little bit; so we have 1/(ad  bc) times the matrix.2137
Well, da  bc is the same thing as ad  bc; this is 0, and this is 0; and cb + ad...well, we can write that as ad  bc.2142
So, 1/(ad  bc) times this...well, we will get 1, 0, 0, 1, which is exactly what we were looking for.2153
So, this is, indeed, equal to identity matrix; and if we were to do it the other way,2162
A times A^{1}, to multiply our inverse from the right side, it would end up coming out the same; we would get the same answer.2166
And it turns out that, if you find a matrix that works on one side, you know that it has to work on the other side.2173
But that is a little bit of a deeper result that we haven't talked about explicitly.2178
But you could prove this just by hand, if you wanted to show AA^{1}; but that is pretty good.2181
The final example: Given that B = 2, 3, 0, 4, and AB = 6, 29, 4, 22, find the matrix A.2186
How are we going to do this? We don't know what A is.2194
We know what AB is; we know what B is; well, notice that we can create a plan like this:2196
AB = ABthat is kind of obvious, but it is true.2201
So, if we came along, we could knock out that B with B^{1}, so we could have AB = AB,2206
and then we would come along and hit it with B^{1} on both sides.2216
And now, we could rewrite this as A =...well, we could cancel out to A on the right side,2221
but we could also see that it is just AB times B^{1}.2227
We know AB; we know B; and so, if there is a B^{1}, we can figure out what it is from our B.2235
So, our first step is to figure out what B^{1} is.2243
And then, once we know what B^{1} is, we just have AB times B^{1}, and we will have our A.2246
So, that is our theoretical understanding; now it is time to just do the arithmetic.2252
If B = 2, 3, 0, 4, then B^{1} equals 1 over the determinant, which is ad  bc,2256
so 2 times 4, minus 0 times 3; so that is 8; times...we flip the location of the main diagonal,2265
and then we put negatives on the other ones: 3 and 0 (we can write as just 0).2274
Simplify that just a little bit to 1/8 times 4, 3, 0, 2.2279
Great; so at this point, we know, from what we showed here, that A is equal to AB times B^{1}.2287
Well, we know that AB is 6, 29, 4, 22; and B^{1} is 1/8 times 4, 3, 0, 2.2299
So, I think it is easier to bring the fraction in afterwards; so let's pull the fraction to the front.2320
The fraction there is just a scalar, so it is just going to scale the matrix.2324
We can scale the matrix any time we want; let's just pull it out to the front, so we can have our matrices do their multiplication.2328
We have 6, 29, 4, 22; 4, 3, 0, 2; OK.2334
There is still that fraction up at the front: 1/8 times whatever comes out of this.2348
It will come out to be a 2 x 2; 6, 29 times 4, 0: 6 times 4 gets us 24; 29 times 0 is just 0.2354
6, 29 on 3, 2; 6 times 3 gets us positive 18; 29 times 2 gets us 58; so that gets us a positive 40.2368
Oops, I'm sorry; it is not positive; 29 times 2 got us 58, so it is a 40; I'm sorry about that.2382
4, 22 on 4, 0: 4 times 4 gets us 16; and 22 times 0 is just 0.2388
4, 22 on 3, 2: 4 times 3 is 12; 22 times 2 is 44; 12  44 comes out to be 56.2396
So, at this point, we can use our 1/8; we simplify this out: we get 1/8 times 24 will become...24/8 is 3; the negatives cancel out, so we get +3.2407
1/8 times 40 becomes positive 5; 1/8 times 16 becomes 2; 1/8 times 56 becomes positive 7.2419
We have A = 3, 5, 2, 7; and there we are.2429
We had to do a lot of arithmetic to get to this point, so let's doublecheck and make sure that that is the answer.2436
We know that A times B has to be this right here, because we were given AB, right from the beginning.2441
So, let's take a look: what would A times B be?2448
Well, we know what the A that we just figured out is: that is 3, 5, 2, 7;2450
and the B we started with, that we were given, is 2, 3, 0, 4.2456
So, we work this out; the 3, 5 on 2, 0 is going to get us a 6; 3, 5 on 3, 4 is going to get us 9 + 20, so 29.2463
2, 7 on 2, 0 is going to get us 2 times 2...+4; and 2, 7 on 3, 4...2 times 3 gets us 6; 7 times 4 gets us 28; add those togetheryou get 22.2477
And so, that is exactly the AB that we started with; so it checks outour answer is good.2491
Great; all right, so that completes an understanding of determinants and inverses.2497
We have a great understanding of how that works right now.2500
We will see you at Educator.com latergoodbye!2503
However, if you want to check out the stuff for if we want to be able to do inverses for larger than 2 x 2,2505
larger than just that simple formula, let's take a look at itlet's look at that.2514
Finding the inverse of larger matrices: for the method we are about to discuss, we will need some techniques we haven't learned just yet.2519
In the first part of the next lesson, we discuss augmented matrices, row operations, and GaussJordan elimination.2525
You will need to be familiar with these things before what we are about to talk about will totally make sense.2532
So, if you haven't already seen these things, go and check them out first, and then come back and watch this part.2537
It is just the first half of the next lessonactually, probably more like the first third.2541
The method we are about to go over is applicable for finding the inverse of any m x n matrix.2546
If the matrix has no inverse, if it is singular, this method will end up failing.2550
It is normally easier to first check that there is going to be an inverse, before trying to put all of this work into it.2554
Just check to make sure that there is an inverse by getting the determinant,2559
because getting the determinant will actually take much less time that working through this method.2562
It is a good idea to check the determinant first to make sure that what you are doing will actually manage to work out.2566
All right, let's see how to do this: for an m x n matrix A, you begin by creating an augmented matrix with the identity matrix I_{n}.2571
So, if we have some A that is 1, 3, 2, 4, then we leave that part the same, and we drop in an identity matrix.2578
Since this is a 2 x 2, this ends up being a 2 x 2 identity matrix, right here.2586
We have 1, 3, 1, 0; 2, 4, 0, 1; we have it split in this middle, where the left side is A, and the right side is the identity matrix.2591
OK, the next step: you start applying the method of GaussJordan elimination.2601
You use row operations to reduce A, that left side, to the identity matrix.2606
The result of the augmented matrix, once you manage to finally get this to be the identity matrix2612
what you will have on the right side will be the inverse; you will have A^{1} on the right side.2617
So, for example, if we have 1, 3, 2, 4, our first step is that we want to turn this into a 0.2622
We are doing GaussJordan: so we take our row 2, and we add 2 times row 1; so 2 times 1 gets us +2;2629
that cancels to 0; 2 times 3 gets us +6 on 4; that goes to 2; 2 times 1 on 0 gets us 2;2636
2 times 0 on 1 is the same as it was before; so we have our new matrix here.2644
We continue with this method; we had 1, 3, 1, 0; 0, 2, 2, 1 on the previous slide.2648
So at this point, we want to turn this into a 1; so we multiply that entire row by 1/2.2653
This becomes 1; 2 times 1/2 becomes 1; 1 times 1/2 becomes 1/2.2659
At this point, we now want to get rid of this; we want to turn this into a 0 to continue with GaussJordan elimination.2665
So, we subtract: we have a 1 here already, so we subtract 3 of row 2: so 3 times this:2670
1 times 3 on 3 gets us 0; and also, 0 times 3 gets us 1; we don't have any effect there.2678
Minus 3 here gets us 2; and 3 on 1/2 gets us 3/2.2686
So, at this point, we have an identity matrix here; this is just an identity matrix, because it is 1's on the main diagonal and 0's everywhere else.2692
So, what we have over here on the right side is our inverse matrix, A.2700
That is our inverse matrix A; we just bring it down and turn that into a matrix, and we have our answer.2706
Finally, you want to check your work; it is really easy to make a mistake in all of that arithmetic.2712
We were doing the simplest possible of 2 x 2; if you have to do this by hand, you are going to have to be at least doing 3 x 3 or larger.2716
So, it is really easy to end up making a mistake in all of that arithmetic.2722
So, make sure to do notations of what your row operations were, what we saw on the left there,2725
what we talk about in the next lesson when we explain this stuff.2729
And also, at the end, once you get to the very end, check your answer;2732
make sure that A^{1} times A is equal to the identity matrix,2735
or A times A^{1} is equal to the identity matrix.2738
So, for example, we started with A = this, and we figured out that A^{1} should equal this.2741
So, we check our work: we multiply the two matrices together.2745
1, 3 times 2, 1: well, 1 times 2, plus 3 times 1...2 + 3; that comes out to be 1.2750
1, 3 on 3, 2; that gets us 3, 2 + 3, 2, so that comes out to be 0; they cancel out.2758
Next, 2, 4 on 2, 1; 2 times 2 is 4, minus 4 times 2...4  4...that comes out to be 0.2766
And then, 2, 4 on 3, 2...3/2 times 1/2...so 2 times 3/2 gets us positive 6/2, minus 4/2; so we get 1 out of that.2775
Ultimately, it all checks out; we have figured out that this is, indeed, the inverse; it does end up working out just fine.2788
It is a really good idea to check your work at this point, because it is easy to make a mistake when you are doing that much arithmetic.2795
So, if you have to do this stuff by hand, always check your work at the end, because it is going to be a small amount of time2801
compared to the massive amount of time that you spend doing this.2805
And it would be a real shame if it ended up not being true.2807
All right, I hope that gives you a pretty good sense of how all this inverse and determinant stuff works.2810
And we will see you in the next lesson, when we finally get to see an application of just how powerful matrices are2815
why we have been interested in them; it is because they allow us to do all sorts of really amazing things2820
that make things much easier than they would be from what we are used to so farsome pretty cool stuff.2825
All right, we will see you at Educator.com latergoodbye!2830
1 answer
Last reply by: Professor SelhorstJones
Thu Dec 4, 2014 5:25 PM
Post by Johnathon Kocher on December 3, 2014
Hello, I'm just dropping a comment to let you know the "Download Lecture Slides" and "Practice Questions" tabs are empty for this lecture.
1 answer
Last reply by: Professor SelhorstJones
Sun Mar 9, 2014 2:34 PM
Post by Christopher Hu on March 8, 2014
I tried the "alternative" method for a 4x4 matrix and it does not work. the "alternative" method only works for a 3x3, right?
1 answer
Last reply by: Professor SelhorstJones
Sat Aug 10, 2013 1:00 PM
Post by Ikze Cho on August 10, 2013
Does the "alternative method for 3x3 matrices" only apply for the 3x3 matrices or also for other matrices?