Determinant of a Matrix – With Step by Step Examples
What is the Determinant of a Matrix?
The determinant is a single numerical value that can be calculated from a square matrix (a matrix with the same number of rows and columns). It is written as det(A) or |A|.
For Example
A = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix} \det(A) = (3)(4) - (2)(1) = 12 - 2 = 10
Why the Determinant Matters?
Determinant is crucial because it tells us how a matrix behaves in many mathematical and geometric contexts. It provides information about the matrix, including its inverse and how it transforms space (such as stretching, shrinking, or flipping).
Determinant Formulas by Matrix Size
Calculating the determinant of a matrix depends on the order (size) of the matrix. Let’s explore how to find determinants for different sizes.
Determinant of a 1×1 Matrix
For a 1×1 matrix:
A=[a] \\
The determinant is simply the element itself:
\det(A) = a \\
Example:
A = [5] \quad \Rightarrow \quad \det(A) = 5
Determinant of a 2×2 Matrix (With Example)
For the following Matrix
A=\begin{bmatrix} a & b \\ c & d \end{bmatrix} \\
The Formula is:
\det(A) = ad - bc \\
Example:
A = \begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix} \\
\det(A) = (3)(4) - (2)(1) = 12 - 2 = 10
Determinant of a 3×3 Matrix (Step-by-Step + Shortcut)
For the following matrix:
A=\begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix} \\The cofactor expansion formula is:
\det(A) = a(ei - fh) - b(di - fg) \\+ c(dh - eg) \\
Step by Step Example:
A = \begin{bmatrix} 2 & 3 & 1 \\ 4 & 1 & 5 \\ 3 & 2 & 2 \end{bmatrix} \\
\det(A) = 2(1\times 2 - 5\times 2) \\- 3(4\times 2 - 5\times 3) + 1(4\times 2 - 1\times 3) \\
\det(A) = 2(2 - 10) - 3(8 - 15) + (8 - 3) \\
\det(A) = 2(-8) - 3(-7) + 5 =\\ -16 + 21 + 5 = 10
Shortcut (Sarrus Rule):
For 3×3 matrices, you can use the Sarrus Rule. Multiply the diagonals going down-right and subtract the diagonals going up-right.
Determinant of 4×4 and Higher Matrices
For the following matrix:
A=\begin{bmatrix}
a_{11} & a_{12} & a_{13} & a_{14} \\
a_{21} & a_{22} & a_{23} & a_{24} \\
a_{31} & a_{32} & a_{33} & a_{34} \\
a_{41} & a_{42} & a_{43} & a_{44}
\end{bmatrix}There is no simple formula, but we can use two of the best methods, Laplace Expansion or Row reduction, to find the determinant.
Laplace Expansion
Expand along any row or column, e.g., the first row:
\det(A) = a_{11}M_{11} - a_{12}M_{12} \\+ a_{13}M_{13} - a_{14}M_{14} \\
\text{where } M_{1j} \text{ is the determinant of the } \\
3\times 3 \text{ minor matrix formed by removing } \\
\text{ row 1 and column } j.Row Reduction Method
Alternatively, convert the matrix into upper triangular form using row operations.
Then the determinant is the product of the diagonal elements, adjusted for any row swaps (each swap changes the sign).
Methods to Calculate Determinant
There are several methods to calculate the determinant of a matrix, depending on its size and complexity.
Each method has its own advantages and disadvantages. Let’s go through all of them one by one.
1. Rule of Sarrus (for 3×3 Matrices)
The Rule of Sarrus is a simple shortcut to find the determinant of a 3×3 matrix.
A=\begin{bmatrix}
a & b & c \\
d & e & f \\
g & h & i
\end{bmatrix}To apply the rule:
- Rewrite the first two columns of the matrix next to it.
- Multiply the diagonals from the top-left to bottom-right and sum them.
- Multiply the diagonals from bottom-left to top-right and subtract them.
\det(A) = (aei + bfg + cdh)\\ - (ceg + bdi + afh)
2. Laplace Expansion (Cofactor Method)
Laplace expansion, also known as cofactor expansion, is a general and systematic method for calculating determinants of any size.
\text{For an } n\times n \text{ matrix } A=[a_{ij}]: \\
\det(A) = \sum_{j=1}^{n} (-1)^{1+j} a_{1j} \det(M_{1j}) \\where:
M_{1j} \text{ is the minor of } a_{1j} \\ \text{ (the determinant of the smaller matrix } j \\
\text{ after removing row 1 and column } j) \\
(-1)^{1+j} \text{ gives the sign of the cofactor}While this can be used for any size, it works best for 3×3 or 4×4 matrices. This can become lengthy for larger matrices.
3. Row Reduction/Gaussian Elimination
This method uses elementary row operations to simplify the matrix into an upper triangular form.
To perform row operations, you can use our rref calculator.
Steps:
- Use row operations to make all entries below the diagonal zero.
- Once in upper triangular form, the determinant equals the product of diagonal elements.
- Adjust the sign if any rows were swapped (each swap changes the determinant’s sign).
This method is best for larger matrices and is also very efficient for computer calculations and algorithms.
4. Leibniz Formula
The Leibniz formula is the most general definition of the determinant, valid for any n x n matrix.
\det(A) = \sum_{\sigma \in S_n} sgn(\sigma) \prod_{i=1}^{n} a_{i, \sigma(i)}where:
S_n = \text{ all possible permutations of the} \\
\text{numbers 1 to } n \\
sgn(\sigma) = \text{ sign of the permutation } \\
\text{ (positive or negative depending on swaps)}5. Minors and Cofactors
To understand determinant calculations (especially Laplace expansion), you must know minors and cofactors.
Minor (Mᵢⱼ): The determinant of the smaller matrix formed by deleting the i-th row and j-th column from the original matrix.
Cofactor (Cᵢⱼ): The signed minor:
C_{ij} = (-1)^{i+j}M_{ij}Properties of Determinants
Determinants have several important properties that make matrix calculations simpler and help in understanding how transformations work.
The following are the most useful determinant properties with proofs and explanations.
1. det(I) = 1
For the identity matrix:
I=\begin{bmatrix}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & 1
\end{bmatrix}
\det(I) = 1Explanation:
The identity matrix doesn’t change any vector; it represents a transformation that keeps space unchanged.
Hence, the “scaling factor” (determinant is 1.
2. Swapping Two Rows or Columns Changes the Sign of the Determinant
If you swap any two rows (or columns) of a matrix, the determinant changes its sign.
\det(B) = - \det(A)
Explanation:
Swapping two rows flips the orientation of the space (like flipping the direction of the area or volume), so the determinant’s magnitude stays the same, but the sign reverses.
Example:
\begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix}, \quad \det = -2Swap rows ->
\begin{bmatrix}
3 & 4 \\
1 & 2
\end{bmatrix}, \quad \det = 23. det(AB) = det(A) x det(B)
The determinant of a product equals the product of their determinants.
\det(AB) = \det(A) \cdot \det(B)
Explanation:
A determinant measures how a matrix scales space.
When you apply 𝐴 followed by 𝐵, the total scaling factor equals multiplying the individual scaling factors.
Proof Idea:
This property follows from the definition of determinant via row operations or linear composition.
4. det(Aᵀ) = det(A)
The determinant of a transpose is the same as the original matrix.
\det(A^T) = \det(A)
Explanation:
Transposing a matrix swaps rows with columns, but the determinant depends only on the relative arrangement of elements, not on whether they’re viewed as rows or columns.
Hence, the determinant value stays the same.
5. Determinant of a Triangular Matrix
For a triangular matrix (upper or lower triangular):
\det(A) = \text{product of diagonal entries} \\
A = \begin{bmatrix}
a_{11} & * & * \\
0 & a_{22} & * \\
0 & 0 & a_{33}
\end{bmatrix}
\quad \Rightarrow \quad
\det(A) = a_{11}a_{22}a_{33}Explanation:
Since all entries below (or above) the diagonal are zero, the only contributing term in the determinant expansion is the product of diagonal elements.
6. If Any Row or Column is Zero -> det = 0
If an entire row or column of a matrix is all zeros, the determinant is 0.
Explanation:
A zero row (or column) means the matrix collapses space into a lower dimension — the volume or area becomes zero.
Example:
\begin{bmatrix}
1 & 2 \\
0 & 0
\end{bmatrix}
\quad \Rightarrow \quad
\det = (1)(0) - (2)(0) = 07. Multiplying a Row (or Column) by a Scalar multiplies the Determinant by that Scalar
If one row (or column) of a matrix is multiplied by a scalar 𝑘:
\det(B) = k \cdot \det(A)
Example:
A = \begin{bmatrix}
1 & 2 \\
3 & 4
\end{bmatrix} \quad \Rightarrow \quad \det(A) = -2Multiply the first row by 3:
B = \begin{bmatrix}
3 & 6 \\
3 & 4
\end{bmatrix} \quad \Rightarrow \quad \det(B) = 3 \times (-2) = -6Explanation:
Scaling one row scales the overall transformation (area or volume) by that same factor.
Applications of Determinants
Determinants play an important role in linear algebra, geometry, and calculus.
The following are the most important applications of Determinants.
Solving Systems of Linear Equations (Cramer’s Rule)
Cramer’s Rule uses determinants to solve systems of n linear equations with n unknowns, provided the determinant of the coefficient matrix is non-zero.
For a system:
Ax=b
The solution for each variable xi is:
x_i = \frac{\det(A_i)}{\det(A)}\text{where } A_i \text{ is the matrix obtained by replacing the } i^{th} \text{ column of } \\ A \text{ with the constants from } \mathbf{b}.Example (2×2 system):
\begin{cases} 2x+y=5 \\ x-y=1 \end{cases} \\
A=\begin{bmatrix} 2 & 1 \\ 1 & -1 \end{bmatrix}, \quad \mathbf{b} = \begin{bmatrix} 5 \\ 1 \end{bmatrix} \\
\det(A) = (2)(-1) - (1)(1) = -3 \\
A_x = \begin{bmatrix} 5 & 1 \\ 1 & -1 \end{bmatrix}, \quad A_y = \begin{bmatrix} 2 & 5 \\ 1 & 1 \end{bmatrix} \\
\det(A_x) = (5)(-1) - (1)(1) = -6 \\
\det(A_y) = (2)(1) - (5)(1) = -3 \\
x = \frac{\det(A_x)}{\det(A)} = \frac{-6}{-3} = 2, \quad y = \frac{\det(A_y)}{\det(A)} = \frac{-3}{-3} = 1Determinants thus help us in solving linear systems quickly, especially for smaller systems.
Finding the inverse of a Matrix
The inverse of a non-singular (invertible) matrix can be found using determinants and cofactors:
A^{-1} = \frac{1}{\det(A)} \cdot \operatorname{adj}(A)Where adj(A) (the adjugate matrix) is the transpose of the cofactor matrix.
Note: If det(A) = 0, the inverse of matrix does not exist, and the matrix is singular.
Eigenvalues and Characteristic Equation
Determinants are essential in finding eigenvalues of a matrix.
The characteristic equation is formed as:
\det(A - \lambda I) = 0
Solving this equation gives the eigenvalues (λ) of the matrix.
Example:
A=\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} \\\det(A - \lambda I) = \begin{vmatrix} 2-\lambda & 1 \\ 1 & 2-\lambda \end{vmatrix} \\
= (2-\lambda)^2 - 1 = 0 \\
\Rightarrow \lambda = 1, 3These eigenvalues describe how the matrix stretches or compresses space along certain directions.
Linear Transformations and Geometry
In geometry, determinants describe how a linear transformation changes the size and orientation of geometric figures
- The absolute value of the determinant gives the scaling factor for area (2D) or volume (3D).
- The sign of the determinant shows whether the transformation preserves or reverses orientation.
Example:
If a transformation matrix A has det(A) = -2:
- The shape’s area doubles
- The orientation flips
Calculus and Jacobian Determinants
In multivariable calculus, determinants appear in the Jacobian matrix, which describes how functions transform between coordinate systems.
For a transformation:
(x,y) \to (u,v) \\
The Jacobian determinant is:
J = \begin{vmatrix}
\frac{\partial u}{\partial x} & \frac{\partial u}{\partial y} \\
\frac{\partial v}{\partial x} & \frac{\partial v}{\partial y}
\end{vmatrix}Meaning:
- |J| represents the local area (or volume) scaling factor at a point.
- It is crucial when changing variables in integrals.
Frequently Asked Questions (FAQs)
What is a determinant of a matrix?
The determinant is a single number that represents certain properties of a square matrix. It tells whether the matrix is invertible, and how it scales or flips space.
What is the easiest way to find a determinant?
For 2×2 matrices, use 𝑎𝑑 − 𝑏𝑐. For 3×3, use the Rule of Sarrus or cofactor expansion, and for larger matrices, row reduction is the simplest and fastest method.
What does a zero determinant mean?
A zero determinant means the matrix is singular and has no inverse. It also shows that its rows or columns are linearly dependent.
Can non-square matrices have determinants?
No, only square matrices (same number of rows and columns) have determinants. Non-square matrices do not have a defined determinant.
How to find the determinant of 5×5?
Use Laplace expansion or row reduction to simplify the matrix into triangular form, then multiply the diagonal entries. Row reduction is usually faster for large matrices.
Why is the determinant important?
Determinants help check if a matrix is invertible and are used in solving linear systems, finding inverses, and computing eigenvalues. They also describe how transformations scale area or volume.
