Determinant#
The determinant is a scalar quantity associated with any square matrix
Geometrically, the determinant tells us:
How the matrix
scales volume: The absolute value is the volume-scaling factor for the linear transformation .Whether the transformation preserves or flips orientation: If
, the transformation preserves orientation; if , it reverses it (like a reflection).
Algebraically, the determinant can be defined as:
where:
The sum is over all permutations
of , is or depending on the parity of the permutation.
This formula is computationally expensive and confusing, but conceptually important: it captures how the determinant depends on all possible signed products of entries, each taken once from a distinct row and column.
Let’s illustrate the determinant geometrically.
Show code cell source
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
# Define matrices to show area effects
matrices = {
"Area = 1 (Identity)": np.array([[1, 0], [0, 1]]),
"Area > 1": np.array([[2, 0.5], [0.5, 1.5]]),
"Area < 0 (Flip)": np.array([[0, 1], [1, 0]]),
"Rotation (Area = 1)": np.array([[np.cos(np.pi/4), -np.sin(np.pi/4)],
[np.sin(np.pi/4), np.cos(np.pi/4)]])
}
# Unit square
square = np.array([[0, 0],
[1, 0],
[1, 1],
[0, 1],
[0, 0]]).T
fig, axes = plt.subplots(1, 4, figsize=(20, 5))
for ax, (title, M) in zip(axes, matrices.items()):
transformed_square = M @ square
area = np.abs(np.linalg.det(M))
det = np.linalg.det(M)
# Plot original unit square
ax.plot(square[0], square[1], 'k--', label='Unit square')
ax.fill(square[0], square[1], facecolor='lightgray', alpha=0.4)
# Plot transformed shape
ax.plot(transformed_square[0], transformed_square[1], 'b-', label='Transformed')
ax.fill(transformed_square[0], transformed_square[1], facecolor='skyblue', alpha=0.6)
# Add vector arrows for columns of M
origin = np.array([[0, 0]]).T
for i in range(2):
vec = M[:, i]
ax.quiver(*origin, vec[0], vec[1], angles='xy', scale_units='xy', scale=1, color='red')
ax.set_title(f"{title}\nDet = {det:.2f}, Area = {area:.2f}")
ax.set_xlim(-2, 3)
ax.set_ylim(-2, 3)
ax.set_aspect('equal')
ax.grid(True)
ax.legend()
plt.suptitle("Geometric Interpretation of the Determinant (Area Scaling and Orientation)", fontsize=16)
plt.tight_layout(rect=[0, 0, 1, 0.93])
plt.show()

Identity: No change — area = 1.
Stretch: Expands area — determinant > 1.
Flip: Reflects across the diagonal — determinant < 0.
Rotation: Rotates without distortion — determinant = 1.
What is the Determinant?#
The determinant of a matrix
The determinant has several important properties:
(i)
(ii)
(iii)
(iv)
(v)
Practical Computation of the Determinant#
The algebraic definition of the determinant is computationally expensive. In practice, we compute the determinant using property (iii) and a matrix factorization such as the PLU decomposition:
where
Theorem (Triangular Matrix Determinant)
Let
Then:
Then,
Since:
(if unit lower triangular), , , where is the number of row swaps,
this method reduces determinant computation to
Cofactor Expansion: Definition#
Cofactor expansion (also called Laplace expansion) gives a recursive definition of the determinant.
Let
Then the determinant of
For simplicity, we’ll define it for the first column.
Where:
is the entry in row , column 1 is the minor matrix obtained by deleting row and column 1 from is the sign factor for alternating signs (from the checkerboard sign pattern) is called the cofactor of
This formula recursively reduces the computation of a determinant to smaller and smaller submatrices.
Cofactor Expantion Example (3×3 Matrix)#
Let:
Expand along the first column:
Now compute the 2×2 determinants:
So:
Proof. via Laplace Expansion / Cofactor Expansion
We’ll prove this for upper triangular matrices by induction on the matrix size
Base Case:
Let
The base case holds.
Inductive Step
Assume the result holds for
Now let
Use cofactor expansion along the first column. Since the only nonzero entry in the first column is
Where
is still upper triangular.By the inductive hypothesis:
So:
The inductive step holds.
Conclusion
By induction, for any upper (or lower) triangular matrix
The determinant accumulates only the diagonal entries because each pivot is isolated, and all other paths in the expansion have zero entries.
This result is frequently used in:
Computing determinants from LU decomposition
Checking invertibility efficiently
Proving properties of eigenvalues and characteristic polynomials