[Math] Determinants through dot products

determinantintuitionlinear algebravectors

Thanks for reading!

So, in Paulo Buchsbaum's answer to this question on Quora…

https://www.quora.com/What-is-the-mathematical-intuition-behind-the-determinant-of-a-matrix-How-was-its-definition-conceived-and-why-is-it-important-What-does-it-mean-intuitively

…he defines a beautiful way to calculate the determinant of a matrix through dot products. One I hadn't seen before.

He goes through the process of calculating this determinant for a $(3,3)$ matrix.

I know this is a long request, but I was wondering if someone could take me through the process of doing it for a $(4,4)$ dimensional matrix, as (as you can see from my comment to his answer) I'm getting really confused.

I would really appreciate it!

Thank you!


Edit:

After reading @MatthewTowers comment (thanks), here is my explanation of what he's done for the $(3,3)$ case:

Let's say we've got a $(3,3)$ matrix with a left column vector $\vec{a}$, a middle column vector $\vec{b}$, and a right column vector $\vec{c}$.

These three vectors create a parallelepiped. The volume of that parallelepiped is the determinant of the matrix.

As you read, here's a picture (taken from Paulo's answer) for reference:

enter image description here

Each vector has three components since they exist in three-dimensional space (aka the matrix has three rows).

$\vec{a} = \begin{bmatrix}a_1 \\ a_2 \\ a_3 \end{bmatrix} \vec{b} = \begin{bmatrix}b_1 \\ b_2 \\ b_3 \end{bmatrix} \vec{c} = \begin{bmatrix}c_1 \\ c_2 \\ c_3 \end{bmatrix}$

Note that $\vec{b}$ and $\vec{c}$ create a parallelogram.

This parallelogram is the "base" of the parallelepiped created by all three column-vectors, and the component of $\vec{a}$ perpendicular to this parallelogram is the height of the parallelepiped.

Let's ignore $\vec{a}$ for now.

The first step is to find a vector $\vec{n}$ that's orthogonal to both $\vec{b}$ and $\vec{c}$.

We set $\vec{n} \bullet \vec{b}=0$ and $\vec{n} \bullet \vec{c}=0$.

Or, in other words, $n_1b_1 + n_2b_2 + n_3b_3 = 0$ and $n_1c_1 + n_2c_2 + n_3c_3 = 0$

That's three unknowns and only two equations.

However, we can choose $n_1$ to be whatever we want, which allows us to solve for $\vec{n}$.

The second step is to find a vector $\vec{o}$ that's orthogonal to $\vec{b}$ and $\vec{n}$.

Notice that $\vec{o}$ will be in the same plane as $\vec{b}$ and $\vec{c}$, but will be perpendicular to $\vec{b}$.

We set $\vec{o} \bullet \vec{b}=0$ and $\vec{o} \bullet \vec{n}=0$.

Once more, that gives us three unknowns and only two equations.

However, we can choose $o_1$ to be whatever we want, which allows us to solve for $\vec{o}$.

We now set the magnitude of $\vec{o}$ to be equal to the magnitude of $\vec{b}$.

$\left \| \vec{o} \right \| := \left \| \vec{b} \right \|$

Note that this makes $\vec{o}$ a vector orthogonal to $\vec{b}$ but in the same plane as $\vec{b}$ and $\vec{c}$, whose magnitude is the magnitude of $\vec{b}$.

If we take the dot product of $\vec{o}$ and $\vec{c}$, that gives us the area of the parallelogram created by $\vec{b}$ and $\vec{c}$.

That's because $\vec{c} \bullet \vec{o}$ is the magnitude of the projection of $\vec{c}$ onto $\vec{o}$ multiplied by the magnitude of $\vec{o}$.

The projection of $\vec{c}$ onto $\vec{o}$ is the height of the parallelogram with $\vec{b}$ taken as the base, since $\vec{o}$ is orthogonal to $\vec{b}$.

And, the magnitude of $\vec{o}$ is equal to the magnitude of $\vec{b}$. So, the dot product $\vec{c} \bullet \vec{o}$ is the height times the base, aka the area of the parallelogram created by $\vec{b}$ and $\vec{c}$.

Now, we set the magnitude of $\vec{n}$ equal to the area of that parallelogram.

$\left \| \vec{n} \right \| := \vec{c} \bullet \vec{o} $

And finally, we compute $\vec{a} \bullet \vec{n} $, and get the determinant of the matrix!

Why does this last step work?

For the same reason as the previous dot product – $\vec{n}$ is orthogonal to the parallelogram created by $\vec{b}$ and $\vec{c}$.

Taking the dot product of $\vec{a}$ and $\vec{n}$ is the same thing as taking the projection of $\vec{a}$ onto $\vec{n}$ and multiplying it by the magnitude of $\vec{n}$.

The projection of $\vec{a}$ onto $\vec{n}$ is the height of the parallelepiped, with the parallelogram created by $\vec{b}$ and $\vec{c}$ taken to be the base, and the magnitude of $\vec{n}$ is the area of the parallelogram, aka the area of the base.

Once again, height times base equals volume.

The volume of the parallelepiped is the determinant of the matrix!


To conclude, I have two questions:

I can see that what he's doing is getting a matrix with $n$ column vectors, calculating the cross-product of the last $n-1$ vectors, and then taking the dot product of the first vector with that cross product.

However, how does this connect with the "normal" way to calculate determinants? Is there a way to derive the cross-product formula from his method?

Secondly, if someone could just carry out the process for $n=4$, I'd really appreciate it! I'm getting two equations with four unknowns…

Thanks!


Edit 2:

This is just to show what I've done so far, in regards to my second question (the request for someone to take me through this guy's process for a $(4,4)$ matrix):

Calculate $det(\vec{a},\vec{b},\vec{c},\vec{d})$

Take out the $\vec{a}$, and calculate $det(\vec{b},\vec{c},\vec{d})$

To do so, we take out the $\vec{b}$, and calculate $det(\vec{c},\vec{d})$

To do so, we declare an $\vec{n}$ such that $\vec{n} \bullet \vec{c} = 0$ and $\vec{n} \bullet \vec{d} = 0$.

In other words, $\vec{n}$ is orthogonal to the parallelogram created by $\vec{c}$ and $\vec{d}$.

(And here’s where I'm stuck…should $\vec{n}$ be orthogonal to $\vec{a}$ as well? Right now, I have two equations, but four unknowns, and I’m not sure what to do…

Best Answer

The method at that site ignores the sign of the determinant, and is phrased in a way that makes the generalization to higher dimensions a bit less clear than I'd like. I'll try here to provide an altered version of the approach up to four dimensions. I'll use bold for vectors, subscripts for components, and double vertical lines for length, so that $\left\Vert \mathbf{a}\right\Vert =\sqrt{a_{1}^{2}+a_{2}^{2}+\cdots}$.

As was mentioned by LutzL in a comment, this method is very closely connected to using the $QR$-decomposition to find the absolute value of the determinant, as described on Wikipedia here.


1D:

Let's calculate $\det\left(\mathbf{a}\right)$ where $\mathbf{a}$ has one nonzero component. It's $\left\Vert \mathbf{a}\right\Vert$ if $\mathbf{a}$ has a positive component and $-\left\Vert \mathbf{a}\right\Vert$ if $\mathbf{a}$ has a negative component.


2D:

Let's calculate $\det\left(\mathbf{a},\mathbf{b}\right)$ where $\mathbf{a}$ and $\mathbf{b}$ are not collinear.

Let's ignore $\mathbf{a}$ for now. The first step is to find a vector $\mathbf{n}$ that's orthogonal to $\mathbf{b}$. We set $\mathbf{n}\bullet\mathbf{b}$ equal to $\boldsymbol{0}$. That's two unknowns and only one equation. In a typical case, the component $n_{1}$ of $\mathbf{n}$ is not forced to be $0$, so it can be whatever we want that's nonzero (e.g. $1$). (In a special case, $n_{1}$ might be forced to be $0$, but then $n_{2}$ can be chosen freely.)

Now scale $\mathbf{n}$ to get a new vector $\mathbf{n}'$ so that $\left\Vert \mathbf{n}'\right\Vert =\left\Vert \mathbf{b}\right\Vert$ . By some geometry, the area of the parallelogram formed by $\mathbf{a}$ and $\mathbf{b}$ is then $\left|\mathbf{n}'\bullet\mathbf{a}\right|$. The determinant is $\pm\mathbf{n}'\bullet\mathbf{a}$ where the $\pm$ sign here (which may not be the sign of the determinant) is positive exactly when the rotation to get from $\mathbf{a}$ to $\mathbf{b}$ is in the same direction (clockwise or counterclockwise) as the rotation to get from $\mathbf{b}$ to $\mathbf{n}'$. Unfortunately, that can't be determined by a dot-product calculation.


3D:

Let's calculate $\det\left(\mathbf{a},\mathbf{b},\mathbf{c}\right)$ where $\mathbf{a},\mathbf{b},\mathbf{c}$ are not coplanar.

Let's ignore $\mathbf{a}$ for now. The first step is to find a vector $\mathbf{n}$ that's orthogonal to both $\mathbf{b}$ and $\mathbf{c}$. We set $\mathbf{n}\bullet\mathbf{b},\mathbf{n}\bullet\mathbf{c}$ equal to $\boldsymbol{0}$. That's three unknowns and only two equations. In a typical case, the component $n_{1}$ of $\mathbf{n}$ is not forced to be $0$, so it can be whatever we want that's nonzero (e.g. $1$). (In a special case, $n_{1}$ might be forced to be $0$, but then $n_{2}$ or $n_{3}$ can be chosen freely.)

The second step is to find a vector $\mathbf{o}$ that's orthogonal to $\mathbf{c}$ (this choice differs from the original author), but lies in the same plane as $\mathbf{b}$ and $\mathbf{c}$. To keep it in that plane, we need $\mathbf{o}$ to be orthogonal to $\mathbf{n}$. So we have $\mathbf{o}\bullet\mathbf{n}=\boldsymbol{0}$ as well as $\mathbf{o}\bullet\mathbf{c}=\boldsymbol{0}$. Again that's three unknowns and two equations, so we have a degree of freedom and could choose a particular value for some component.

Now scale $\mathbf{o}$ to get a new vector $\mathbf{o}'$ so that $\left\Vert \mathbf{o}'\right\Vert =\left\Vert \mathbf{c}\right\Vert$ . By some geometry, the area of the parallelogram formed by $\mathbf{b}$ and $\mathbf{c}$ is then $\left|\mathbf{o}'\bullet\mathbf{b}\right|$. Now scale $\mathbf{n}$ to get a new vector $\mathbf{n}'$ so that $\left\Vert \mathbf{n}'\right\Vert =\left|\mathbf{o}'\bullet\mathbf{b}\right|$. By some geometry, the volume of the parallelepiped formed by $\mathbf{a}, \mathbf{b}, \mathbf{c}$ is then $\left|\mathbf{n}'\bullet\mathbf{a}\right|$. The determinant is then $\pm\mathbf{n}'\bullet\mathbf{a}$ where I'm pretty sure the $\pm$ sign is positive when the handedness (right or left) of $\mathbf{a},\mathbf{b},\mathbf{c}$ is the same as that of $\mathbf{c},\mathbf{n}',\mathbf{o}'$.


4D:

Let's calculate $\det\left(\mathbf{a},\mathbf{b},\mathbf{c},\mathbf{d}\right)$ where $\mathbf{a},\mathbf{b},\mathbf{c},\mathbf{d}$ are not in the same $3$-dimensional hyperplane.

Let's ignore $\mathbf{a}$ for now. The first step is to find a vector $\mathbf{n}$ that's orthogonal to all three of $\mathbf{b},\mathbf{c},\mathbf{d}$. We set $\mathbf{n}\bullet\mathbf{b},\mathbf{n}\bullet\mathbf{c},\mathbf{n}\bullet\mathbf{c}$ all to $\boldsymbol{0}$. That's four unknowns and only three equations. In a typical case the component $n_{1}$ of $\mathbf{n}$ is not forced to be $0$, so it can be whatever we want that's nonzero (e.g. $1$). (In a special case, $n_{1}$ might be forced to be $0$, but there will be at least one component we could choose freely.)

The second step is to find a vector $\mathbf{o}$ that's orthogonal to $\mathbf{c}$ and $\mathbf{d}$, but lies in the same $3$-dimensional hyperplane as $\mathbf{b},\mathbf{c},\mathbf{d}$. To keep it in that hyperplane, we need $\mathbf{o}$ to be orthogonal to $\mathbf{n}$. So we have $\mathbf{o}\bullet\mathbf{n}=\boldsymbol{0}$ as well as $\mathbf{o}\bullet\mathbf{c},\mathbf{o}\bullet\mathbf{d}=\boldsymbol{0}$. Again that's four unknowns and three equations, so we have a degree of freedom and could choose a particular value for some component.

The third step is to find a vector $\mathbf{p}$ that's orthogonal to $\mathbf{d}$, but lies in the same $2$-dimensional plane as $\mathbf{c},\mathbf{d}$. To keep it in that plane, it should be orthogonal to $\mathbf{n}$ as well as $\mathbf{o}$. So we have $\mathbf{p}\bullet\mathbf{n},\mathbf{p}\bullet\mathbf{o}=\boldsymbol{0}$ as well as $\mathbf{p}\bullet\mathbf{d}=\boldsymbol{0}$. Again that's four unknowns and three equations, so we have a degree of freedom and could choose a particular value for some component.

Now scale $\mathbf{p}$ to get a new vector $\mathbf{p}'$ so that $\left\Vert \mathbf{p}'\right\Vert =\left\Vert \mathbf{d}\right\Vert$ . By some geometry, the area of the parallelogram formed by $\mathbf{c}$ and $\mathbf{d}$ is then $\left|\mathbf{p}'\bullet\mathbf{c}\right|$. Now scale $\mathbf{o}$ to get a new vector $\mathbf{o}'$ so that $\left\Vert \mathbf{o}'\right\Vert =\left|\mathbf{p}'\bullet\mathbf{c}\right|$. By some geometry, the volume of the parallelepiped formed by $\mathbf{b}, \mathbf{c}, \mathbf{d}$ is then $\left|\mathbf{o}'\bullet\mathbf{b}\right|$. Now scale $\mathbf{n}$ to get a new vector $\mathbf{n}'$ so that $\left\Vert \mathbf{n}'\right\Vert =\left|\mathbf{o}'\bullet\mathbf{b}\right|$. By some geometry, the hypervolume of the hyperparallelepiped formed by $\mathbf{a},\mathbf{b}, \mathbf{c}, \mathbf{d}$ is then $\left|\mathbf{n}'\bullet\mathbf{a}\right|$. The determinant is then $\pm\mathbf{n}'\bullet\mathbf{a}$ where I think the $\pm$ sign is positive when the orientation of $\mathbf{a},\mathbf{b},\mathbf{c},\mathbf{d}$ is the same as that of $\mathbf{d},\mathbf{n}',\mathbf{o}',\mathbf{p}'$.

Related Question