Square Matrix Determinant

The determinant of a square matrix quantifies how the matrix scales volume in a geometric transformation. Given a square matrix , its determinant is given by

A matrix with linearly dependent columns will always yield a determinant of . This is because the linear system is inconsistent if

Intuition

Geometrically, the absolute value of the determinant of a square matrix essentially provides us with the amount of n-dimensional space that the column vectors of the matrix take up. In 2D space, this is area. In 3D space, this is volume. The sign of the determinant shows whether the vector space is flipped with respect to the unit vectors. If the determinant is zero, this means that at least one of the column vectors of the matrix is linearly dependent, and all the vectors are on a single line with an area of 0.

When applied to another structure such as a vector or a matrix, the determinant indicates the scaling factor of the area/volume of the product of the transformation relative to the original structure.

Example

Determinant as Area and Magnitude

Consider the square matrix . We can plot its vectors on 2D cartesian space as and :

\usepackage{tikz}
 
\begin{document}
\begin{tikzpicture}
   % Coordinate system
   \draw[->] (-5,0) -- (3,0) node[right] {$x$};
   \draw[->] (0,-1) -- (0,3) node[above] {$y$};
 
   % Parallelogram
   \fill[yellow!100, opacity=0.05] (0,0) -- (2,1) -- (-2,3) -- (-4,2) -- cycle;
   \draw[yellow!50!black, thick] (0,0) -- (2,1) -- (-2,3) -- (-4,2) -- cycle;
 
   % Vectors
   \draw[->, thick, green] (0,0) -- (2,1) node[midway, above left] {$\vec{a}_1$};
   \draw[->, thick, red] (0,0) -- (-4,2) node[midway, above] {$\vec{a}_2$};
\end{tikzpicture}
\end{document}

We then get . We can interpret this as either:

  • The area of the space made up by the column vectors of is 8.
  • The matrix scales the area of the identity matrix by a factor of 8.

Since the area of the parallelogram is positive, the vector space orientation has not flipped.

Let’s now swap the rows and columns of each vector of (note that this is not the transpose and that ) as . Then, and . Plotting this in Cartesian space leads us to

\usepackage{tikz}
 
\begin{document}
\begin{tikzpicture}
   % Coordinate system
   \draw[->] (-1,0) -- (3,0) node[right] {$x$};
   \draw[->] (0,-4) -- (0,3) node[above] {$y$};
 
   % Parallelogram
   \fill[yellow!100, opacity=0.05] (0,0) -- (1,2) -- (3,-2) -- (2,-4) -- cycle;
   \draw[yellow!50!black, thick] (0,0) -- (1,2) -- (3,-2) -- (2,-4) -- cycle;
 
   % Vectors
   \draw[->, thick, green] (0,0) -- (1,2) node[midway, above left] {$\vec{b}_1$};
   \draw[->, thick, red] (0,0) -- (2,-4) node[midway, above] {$\vec{b}_2$};
\end{tikzpicture}
\end{document}

with . How are the two plots different? Matrix B, with a negative determinant, appears to have flipped the column vectors of such that is the leftmost (usually where the unit vector is) and is the rightmost (where the unit vector is). As such, the transformation of applied to has flipped the vector space.