In the interest of time, these notes are kept brief, and do not include the wicked cool geometric example of determinants representing areas, volumes, hypervolumes. (You’re coming to class anyway, right?) These examples will be added later, or in future iterations of the course.
Last time, we learned that for a 2 x 2 matrix
serves as its inverse so long, obviously, as ad – bc is nonzero. I also dropped the hint that square matrices behave the most like numbers of all matrices, and that matrices are not invertible if they have some sort of je ne sais quoi they share with zero the number.
Obviously the 2 x 2 matrix
will not be invertible, not least of which because ad – bc here is definitely zero. But the matrix
might look perfectly fine if not for 1(6) – 3(2) = 0. It’s not invertible either. What gives?
As we go forward, we’ll be looking at how matrices transfer information. What does that mean? Well, if I multiply A on the left of the vector , I get
If you’re able to picture it geometrically, this means that the vector gets collapsed into the origin. In fact, since scalars pass through matrix multiplication—, check it yourself!—the entire line through the origin and gets squeezed into the origin.
In other words, multiplying a 2-vector by A loses information. If a function loses information, there is no unique way to retrieve the information—how do we come back from ? Should we use ? Why not or even ?—just like when we multiply by zero there is no unique way to reverse the process. The process, one might say, is not invertible.
So this number ad – bc, which we’ll be calling the determinant of a 2 x 2 matrix (det A) going forward, is somehow a predictor of invertibility. In fact,
A square matrix whose determinant is zero is said to be singular. A matrix is invertible if and only if it is not singular.
The determinant tells us exactly which square matrices are invertible, i.e. which ones do not have this zero-ness that will destroy some of our information.
So how do we compute it?
Example: the cross product
Keeping with the mathematics curriculum’s frustrating tendency to use “future math” as necessary without explaining it, you’ve actually seen determinants before. If and are 3-vectors, then their cross product is
where i, j, and k are the basis vectors , , and as in calculus.
Let’s notice a couple of things about how this was computed. It seems like we add something times i, minus something times j, plus something times k. The sum seems to be alternating along the top row of the determinant. The coefficients of i, j, and k are the determinants, notice, of the smaller matrices obtained by removing the row and column in which i and j and k are located. These smaller determinants are called the cofactors of these elements. The cofactor of the (i,j)-th entry (here unfortunately i and j refer to rows and columns as usual) is denoted .
then the determinant may be re-written as
This is how we’ll compute the determinant of any square matrix.
Computing the determinant
We don’t have to use the top row. We may compute the determinant of any n x n square matrix along any column or row we wish, and the metric we’ll usually use to choose the row is simplicity. The more zeroes, the better! (If a row or column is all zeroes, the determinant will be zero anyway—why?)
If the determinant is computed along the i-th row (hold i fixed), then
Note that the factor keeps the alternation from the cross product example.
If the determinant is computed along the j-th column (hold j fixed), then
Notice that the two formulas are pretty much identical: all that changes is whether you add up the column entries in the row or the row entries in the column.
Now, maybe it’s—oh, I don’t know—the midterm, and you’ve got a scary-looking 4 x 4 matrix where none of the rows or columns look particularly friendly. We can use row reduction to whittle the matrix into something we’d like to work with, but first, we’ll need to know how multiplication affects the determinant.
Properties of the determinant
The determinant plays with our known operations in the following way. If A and B are n x n matrices and is a real number, then
- det AB = det A det B
- If A is invertible, then .
Simplifying the determinant
It’s oddly enough the multiplication rule—(1) above—that predicts how the determinant responds to row reduction. That’s because all three of the row operations we use—swapping rows, multiplying a row by a scalar, and adding a multiple of one row to another—can all be realized by multiplying modifications of the identity matrix called elementary matrices.
For example, to swap the second and third rows of a 3 x 3 matrix, you can multiply it on the left by the matrix
Observe that this is just the identity matrix with its second and third rows exchanged. See for yourself that the determinant of this matrix is -1. In fact, any row-swapping elementary matrix will have a determinant of -1, so
If B is obtained from A by swapping rows, then det B = -det A.
An example of multiplying the first row of a 3 x 3 matrix by 7 is to multiply the whole matrix on the left by
which observe is the identity matrix with its first row multiplied by 7. The determinant of this matrix is 7. In general,
If B is obtained from A by multiplying a row by λ, then det B = λ det A.
Finally, if you were to subtract three times the second row from the first, you would multiply a 3 x 3 matrix by
The determinant of this matrix is just 1.
If B is obtained from A by adding a multiple of one row to another, then det B = det A.
If we keep track of what each move does to our determinant and undo all of the changes on the way, then we can get the determinant of a matrix from the determinant of its simpler, row-reduced form.
Application: Cramer’s rule
Finally, let’s look at an application of determinants to solving linear systems (for this part of the course, it all comes back to linear systems!) Let Ax = b represent a system of linear equations with n variables and n equations and a unique solution.
Let’s break that down: if there are n variables and n equations, then A is square; and if the system has a unique solution, then that solution is , so A has a nonzero determinant.
The unique solution can be found using the determinant of A and the determinant of a new matrix called , which is identical to A except that its i-th column is replaced with b. Cramer’s rule says that
If Ax = b represents a system of n linear equations in n variables with a unique solution, then that solution has entries
That wraps up the first half of our course. Here’s what you should know so far:
- Matrices are arrays of numbers used to represent systems of linear equations.
- Linear systems can be solved by a process called row reduction applied to the augmented matrix that represents that system.
- Matrices have a number-like algebra on their own, independent of their origin as representations of linear systems. In particular, matrices of the same size can be added together. All matrices can be scaled by a number. Matrices with compatible columns and rows can be multiplied together. Some square matrices can be inverted, which is kind of like division.
- Those square matrices that can be inverted have a nonzero determinant. The determinant is a measure of how much the matrix is “like zero” in the sense of whether or not it destroys information by multiplication.
We have reached a natural conclusion in the basic study of matrices, and at this point you know enough to be dangerous. But there’s a thread I’ve been alluding to all through the course, that matrix multiplication is a type of information transfer. Matrix multiplication acts as a special type of function between vector spaces, of which you’ve explicitly seen two—the two-dimensional plane and three-dimensional space in calculus—and of which you’ve seen many more without being told about it. In the second part of the course, we’ll take a look at matrices from that point of view, which will illuminate a lot of what we’ve learned about their basic properties. (In particular, the formula for matrix multiplication will finally make sense!)