Week 9

Determinant

Recall, for a 2×22\times2 matrix A=(abcd)A=\begin{pmatrix} a & b \\ c & d \end{pmatrix}, the determinant of AA is:

detA=det(abcd)=adbc\det A = \det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc

And that A1A^{-1} exists if and only if detA0\det A\neq 0 (because the scalar coefficient is 1detA=1adbc\displaystyle\frac{1}{\det A}=\frac{1}{ad-bc}).

And recall that to compute eigenvalues for a vector, we needed to find values of λ\lambda such that Av=λvA\vector{v}=\lambda\vector{v} (where v0\vector{v}\neq\vector{0}).

λ\lambda is an eigenvalue if there exists v0\vector{v}\neq\vector{0} such that Av=λvA\vector{v} = \lambda\vector{v}… which is also equivalent to the following:

  • (AλI)v=0(A-\lambda I)\vector{v}=\vector{0} for some v0\vector{v}\neq\vector{0}
  • ker(AλI){0}\ker(A-\lambda I)\neq\set{\vector{0}}
  • (AλI)(A-\lambda I) is not invertible
  • det(AλI)=0\det(A-\lambda I)=0

So, the goal here is to find detA\det A for some n×nn\times n matrix AA.

The determinant is a function, usually denoted det\det,

det:Rn××Rnn copiesR\det: \underbrace{\R^n \times\cdots\times\R^n}_{n\text{ copies}} \to \R

satisfying the following properties:

Property 1: Multilinearity

det(u1+v1v2vn)=det(u1v2vn)+det(v1v2vn)det(αv1v2vn)=αdet(v1v2vn)\det \begin{pmatrix} \vector{u}_1 + \vector{v}_1 \\ \vector{v}_2 \\ \vdots \\ \vector{v}_n \end{pmatrix} = \det \begin{pmatrix} \vector{u}_1 \\ \vector{v}_2 \\ \vdots \\ \vector{v}_n \end{pmatrix} + \det \begin{pmatrix} \vector{v}_1 \\ \vector{v}_2 \\ \vdots \\ \vector{v}_n \end{pmatrix} \\ \det \begin{pmatrix} \alpha\vector{v}_1 \\ \vector{v}_2 \\ \vdots \\ \vector{v}_n \end{pmatrix} = \alpha\det \begin{pmatrix} \vector{v}_1 \\ \vector{v}_2 \\ \vdots \\ \vector{v}_n \end{pmatrix}

Property 2: Antisymmetry

Swapping any two rows will flip the sign of the determinant.

det(v1v2)=det(v2v1)\det \begin{pmatrix} \vector{v}_1 \\ \vdots \\ \vector{v}_2 \end{pmatrix} = -\det \begin{pmatrix} \vector{v}_2 \\ \vdots \\ \vector{v}_1 \end{pmatrix}

Property 3: And this shit (doesn’t have a name, just remember it)

The determinant of the identity matrix is one.

det(e1en)=detIn=1\det \begin{pmatrix} \vector{e}_1 \\ \vdots \\ \vector{e}_n \end{pmatrix} =\det I_n = 1

Notice that by properties 1 and 2, det\det is a function that is linear in all rows.

Multilinearity

Take a unit cube, composed of three standard bases: e1,e2,e3\vector{e}_1, \vector{e}_2, \vector{e}_3.

We know that the volume of the unit cube is just length×width×height\text{length}\times\text{width}\times\text{height}.

Or:

1×1×11 \times 1 \times 1

In other words, the volume VV, is:

V=det(e1e2e3)=1.V = \det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = 1.

Then, if one of the side is of length 22 e.g., take 2e22\vector{e}_2. Then, the volume is now

2×1×1=2.2\times1\times1 = 2.

Or:

V=det(2e1e2e3)=2det(e1e2e3)=2.V = \det\begin{pmatrix} 2\vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = 2\det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = 2.

Then, for sides a,b,ca,b,c, the volume of a given cube can be written as

V=det(ae1be2ce3).V = \det\begin{pmatrix} a\vector{e}_1 \\ b\vector{e}_2 \\ c\vector{e}_3 \end{pmatrix}.

And by linearity (and that detI=1\det I = 1),

V=det(ae1be2ce3)=abcdet(e1e2e3)=abc(1)=abc.V = \det\begin{pmatrix} a\vector{e}_1 \\ b\vector{e}_2 \\ c\vector{e}_3 \end{pmatrix} = abc\cdot\det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = abc (1) = abc.

Also note that

det(ae1be2ce3)=det(a000b000c)=abc\det\begin{pmatrix} a\vector{e}_1 \\ b\vector{e}_2 \\ c\vector{e}_3 \end{pmatrix} = \det\begin{pmatrix} a & 0 & 0 \\ 0 & b & 0 \\ 0 & 0 & c \end{pmatrix} = abc

And so, we can surmise for any diagonal matrices, we have:

Property 4: Diagonal matrices

det(λ100λn)=λ1λ2λn.\det\begin{pmatrix} \lambda_1 & & 0 \\ & \ddots & \\ 0 & & \lambda_n \end{pmatrix} = \lambda_1\lambda_2\cdots\lambda_n.

Antisymmetry

Again, consider a unit cube in R3\R^3. We now know that the determinant of the three basis vectors produces the volume, such as:

V=det(e1e2e3)=1.V = \det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = 1.

We also know that for a cube with sides of length one, its volume is always one. So, of course the order of the sides shouldn’t matter. However, by antisymmetry, switching two rows would mean:

V=det(e2e1e3)=1.V = -\det\begin{pmatrix} \vector{e}_2 \\ \vector{e}_1 \\ \vector{e}_3 \end{pmatrix} = -1.

The negative sign actually just indicates the orientation of the unit cube. Strictly speaking, the volume of the cube is actually the absolute value of the determinant:

V=det(e1e2e3)V = \left|\det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix}\right|

And so, switching the rows in any order would not change the volume of the cube. In R3\R^3, there are 3!=63! = 6 combinations you can switch. Namely:

det(e1e2e3)=det(e3e1e2)=det(e2e3e1)=1det(e2e1e3)=det(e3e2e1)=det(e1e3e2)=1\det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_2 \\ \vector{e}_3 \end{pmatrix} = \det\begin{pmatrix} \vector{e}_3 \\ \vector{e}_1 \\ \vector{e}_2 \end{pmatrix} = \det\begin{pmatrix} \vector{e}_2 \\ \vector{e}_3 \\ \vector{e}_1 \end{pmatrix} = 1 \\ \det\begin{pmatrix} \vector{e}_2 \\ \vector{e}_1 \\ \vector{e}_3 \end{pmatrix} = \det\begin{pmatrix} \vector{e}_3 \\ \vector{e}_2 \\ \vector{e}_1 \end{pmatrix} = \det\begin{pmatrix} \vector{e}_1 \\ \vector{e}_3 \\ \vector{e}_2 \end{pmatrix} = -1

Permutation matrix

The permutation matrix is an n×nn\times n matrix obtained by permuting the standard basis vector, ei\vector{e}_i. By properties 1 and 2, we have that

detP=(1)σ\det P = (-1)^\sigma

where σ\sigma is the number of flips required to turn PP back into the identity matrix, InI_n.

And so, for an n×nn\times n matrix, there exists n!n! permuntation matrices.

Now consider a case if we have two identical rows. Then, by this property, switching them would mean that:

det(vv)=det(vv)\det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix} = -\det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix}

Remember that the determinant is just a number. So, the above is only true if and only if the determinant is zero.

det(vv)=det(vv)    det(vv)=0\det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix} = -\det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix} \iff \det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix} = 0

Property 5: Identical rows

det(vv)=0\det\begin{pmatrix} \vector{v} \\ \vdots \\ \vector{v} \end{pmatrix} = 0

Show that

det(1234556789101112131424681011111)=0.\det\begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 5 & 6 & 7 & 8 & 9 \\ 10 & 11 & 12 & 13 & 14 \\ 2 & 4 & 6 & 8 & 10 \\ 1 & 1 & 1 & 1 & 1 \end{pmatrix} = 0.

Notice that row four is a multiple of row one. So, by multilinearity:

det(1234556789101112131424681011111)=2det(123455678910111213141234511111)\det\begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 5 & 6 & 7 & 8 & 9 \\ 10 & 11 & 12 & 13 & 14 \\ 2 & 4 & 6 & 8 & 10 \\ 1 & 1 & 1 & 1 & 1 \end{pmatrix} = 2\cdot\det\begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 5 & 6 & 7 & 8 & 9 \\ 10 & 11 & 12 & 13 & 14 \\ 1 & 2 & 3 & 4 & 5 \\ 1 & 1 & 1 & 1 & 1 \end{pmatrix}

And because two rows are the same:

2det(123455678910111213141234511111)=20=02\cdot\det\begin{pmatrix} 1 & 2 & 3 & 4 & 5 \\ 5 & 6 & 7 & 8 & 9 \\ 10 & 11 & 12 & 13 & 14 \\ 1 & 2 & 3 & 4 & 5 \\ 1 & 1 & 1 & 1 & 1 \end{pmatrix} = 2 \cdot 0 = 0

Additionally, by properties 1 and 5:

det(v1v2)=det(v1v2)+det(cv2v2)=det(v1v2)+cdet(v2v2)=det(v1+cv2v2)\begin{align*} \det\begin{pmatrix} \vector{v}_1 \\ \vdots \\ \vector{v}_2 \end{pmatrix} &= \det\begin{pmatrix} \vector{v}_1 \\ \vdots \\ \vector{v}_2 \end{pmatrix} + \det\begin{pmatrix} c\vector{v}_2 \\ \vdots \\ \vector{v}_2 \end{pmatrix} \\ &= \det\begin{pmatrix} \vector{v}_1 \\ \vdots \\ \vector{v}_2 \end{pmatrix} + c\cdot\det\begin{pmatrix} \vector{v}_2 \\ \vdots \\ \vector{v}_2 \end{pmatrix} \\ &= \det\begin{pmatrix} \vector{v}_1 + c\vector{v}_2 \\ \vdots \\ \vector{v}_2 \end{pmatrix} \end{align*}

Which gives us

Property 6

det(v1v2)=det(v1+cv2v2)\det\begin{pmatrix} \vector{v}_1 \\ \vdots \\ \vector{v}_2 \end{pmatrix} = \det\begin{pmatrix} \vector{v}_1 + c\vector{v}_2 \\ \vdots \\ \vector{v}_2 \end{pmatrix}

Diagonal matrices

The derivation for property 4 tells us that:

det(λ100λn)=λ1λ2λn.\det\begin{pmatrix} \lambda_1 & & 0 \\ & \ddots & \\ 0 & & \lambda_n \end{pmatrix} = \lambda_1\lambda_2\cdots\lambda_n.

However, this also holds for upper and lower triangular matrices.

det(λ10λn)=det(λ10λn)=λ1λ2λn.\det\begin{pmatrix} \lambda_1 & & 0 \\ & \ddots & \\ * & & \lambda_n \end{pmatrix} = \det\begin{pmatrix} \lambda_1 & & * \\ & \ddots & \\ 0 & & \lambda_n \end{pmatrix} = \lambda_1\lambda_2\cdots\lambda_n.

Because trust me bro, that’s how it works. Or here, okay, I give a proof but I cheat you a little bit.

det(λ1ab0λ2c00λ3)=λ1λ2λ3det(1aλ1bλ101cλ1001)=λ1λ2λ3det(1aλ1bλ1010001)R2cλ1R3=λ1λ2λ3det(1aλ10010001)R1bλ1R3=λ1λ2λ3det(100010001)R1bλ1R2=λ1λ2λ3\begin{align*} \det\begin{pmatrix} \lambda_1 & a & b \\ 0 & \lambda_2 & c \\ 0 & 0 & \lambda_3 \end{pmatrix} &= \lambda_1 \lambda_2 \lambda_3 \det\begin{pmatrix} 1 & \frac{a}{\lambda_1} & \frac{b}{\lambda_1} \\ 0 & 1 & \frac{c}{\lambda_1} \\ 0 & 0 & 1 \end{pmatrix} \\ &= \lambda_1 \lambda_2 \lambda_3 \det\begin{pmatrix} 1 & \frac{a}{\lambda_1} & \frac{b}{\lambda_1} \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} & \boxed{R_2 - \frac{c}{\lambda_1}R_3} \\ &= \lambda_1 \lambda_2 \lambda_3 \det\begin{pmatrix} 1 & \frac{a}{\lambda_1} & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} & \boxed{R_1 - \frac{b}{\lambda_1}R_3} \\ &= \lambda_1 \lambda_2 \lambda_3 \det\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{pmatrix} & \boxed{R_1 - \frac{b}{\lambda_1}R_2} \\ &= \lambda_1 \lambda_2 \lambda_3 \end{align*}

By induction, this works for nn lambdas. And the same will apply for lower triangle matrices, just upside-down.

Applying different properties…

Consider a 2×22\times2 matrix (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix}. We know that its determinant is adbcad-bc. We can also derive this by applying the properties of the determinant.

det(abcd)=det(ae1+be2ce1+de2)=det(ae1ce1)+det(ae1de2)+det(be2ce1)+det(be2de2)=acdet(e1e1)+addet(e1e2)+bcdet(e2e1)+bddet(e2e2)=ac(0)+ad(1)+bc(1)+bd(0)=adbc\begin{align*} \det\begin{pmatrix} a & b \\ c & d \end{pmatrix} &= \det\begin{pmatrix} a \vector{\mathbf{e}}_1 + b\vector{\mathbf{e}}_2 \\ c \vector{\mathbf{e}}_1 + d \vector{\mathbf{e}}_2 \end{pmatrix} \\ &= \det\begin{pmatrix} a \vector{\mathbf{e}}_1 \\ c \vector{\mathbf{e}}_1 \end{pmatrix} + \det\begin{pmatrix} a \vector{\mathbf{e}}_1 \\ d \vector{\mathbf{e}}_2 \end{pmatrix} + \det\begin{pmatrix} b \vector{\mathbf{e}}_2 \\ c \vector{\mathbf{e}}_1 \end{pmatrix} + \det\begin{pmatrix} b \vector{\mathbf{e}}_2 \\ d \vector{\mathbf{e}}_2 \end{pmatrix} \\ &= ac \det\begin{pmatrix} \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_1 \end{pmatrix} + ad \det\begin{pmatrix} \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_2 \end{pmatrix} + bc \det\begin{pmatrix} \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_1 \end{pmatrix} + bd \det\begin{pmatrix} \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_2 \end{pmatrix} \\ &= ac (0) + ad (1) + bc (-1) + bd (0) \\ &= ad - bc \end{align*}

We can also do the same thing for a 3×33\times3 matrix (a11a12a13a21a22a23a31a32a33)\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}.

det(a11a12a13a21a22a23a31a32a33)=det(a11e1a12e2a13e3a21e1a22e2a23e3a31e1a32e2a33e3)=decomposes to 27 terms...\begin{align*} \det\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} &= \det\begin{pmatrix} a_{11}\vector{\mathbf{e}}_1 & a_{12}\vector{\mathbf{e}}_2 & a_{13}\vector{\mathbf{e}}_3 \\ a_{21}\vector{\mathbf{e}}_1 & a_{22}\vector{\mathbf{e}}_2 & a_{23}\vector{\mathbf{e}}_3 \\ a_{31}\vector{\mathbf{e}}_1 & a_{32}\vector{\mathbf{e}}_2 & a_{33}\vector{\mathbf{e}}_3 \end{pmatrix} \\ &= \text{decomposes to 27 terms...} \end{align*}

Notice how, for the 2×22\times2, two of the terms cancel out to zero. Here, for a 3×33\times3, only six terms survives. The determinant of the remaining 21 terms will be zero.

det(a11a12a13a21a22a23a31a32a33)=a11a12a13det(e1e2e3)+a11a23a32det(e1e3e2)+a12a21a33det(e2e1e3)+a12a23a31det(e2e3e1)+a13a21a32det(e3e1e2)+a13a22a31det(e3e2e1)\begin{split} \det\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} &= a_{11} a_{12} a_{13} \det\begin{pmatrix} \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_3 \end{pmatrix} + a_{11} a_{23} a_{32} \det\begin{pmatrix} \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_3 \\ \vector{\mathbf{e}}_2 \end{pmatrix} + a_{12} a_{21} a_{33} \det\begin{pmatrix} \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_3 \end{pmatrix} \\ &\quad+ a_{12} a_{23} a_{31} \det\begin{pmatrix} \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_3 \\ \vector{\mathbf{e}}_1 \end{pmatrix} + a_{13} a_{21} a_{32} \det\begin{pmatrix} \vector{\mathbf{e}}_3 \\ \vector{\mathbf{e}}_1 \\ \vector{\mathbf{e}}_2 \end{pmatrix} + a_{13} a_{22} a_{31} \det\begin{pmatrix} \vector{\mathbf{e}}_3 \\ \vector{\mathbf{e}}_2 \\ \vector{\mathbf{e}}_1 \end{pmatrix} \end{split}

Then, after some careful calculation using the properties, we will see that the we end up with our expression for the determinant for a 3×33\times3 matrix.

det(a11a12a13a21a22a23a31a32a33)=a11det(a22a23a32a33)a12det(a21a23a31a33)+a13det(a21a22a31a32)\begin{align*} \det\begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix} &= a_{11} \det\begin{pmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{pmatrix} - a_{12} \det\begin{pmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{pmatrix} + a_{13} \det\begin{pmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{pmatrix} \end{align*}

Then, what about R4\R^4 and beyond… the number of terms that it come out of matrix will grow exponentially. In fact, the only way to do this in a sane manner, is to turn to our good friend Gauss.

Week 9

Determinant

Multilinearity

Antisymmetry