Matrix Determinant: Formula, Rules & Examples

A matrix determinant is a scalar value calculated from a square matrix that reveals important information about the matrix and the linear transformation it represents. For a 2×2 matrix, the determinant is ad − bc. A nonzero determinant means the matrix is invertible, has full rank, and does not collapse the entire space into a lower dimension. A zero determinant means the matrix is singular and has no inverse. Geometrically, the absolute value of the determinant gives the factor by which a square linear transformation scales area in two dimensions or volume in three dimensions, while the sign indicates whether orientation is preserved or reversed. Determinants also interact with matrix multiplication, eigenvalues, systems of equations, and changes of basis. Although the 2×2 formula is simple, larger determinants require methods such as cofactor expansion or row reduction. Understanding the determinant therefore involves both calculation rules and the structural information the resulting number carries.
What Is a Matrix Determinant?
The determinant is a scalar associated with a square matrix.
For a matrix A, it is written:
det(A)
or sometimes:
|A|
If:
A = [ a b ]
[ c d ]
then:
det(A) = ad − bc
For example:
A = [ 3 2 ]
[ 1 4 ]
gives:
det(A) = 3(4) − 2(1)
= 12 − 2
= 10
The determinant is:
10
Unlike matrix addition or matrix multiplication, which produce another matrix, the determinant produces a single scalar.
Matrix Determinant Formula for a 2×2 Matrix
For:
A = [ a b ]
[ c d ]
the formula is:
det(A) = ad − bc
One way to remember it is:
main diagonal product − other diagonal product
The main diagonal product is:
ad
The opposite diagonal product is:
bc
Therefore:
det(A) = ad − bc
The order of subtraction matters.
2×2 Matrix Determinant Example
Find the determinant of:
A = [ 5 3 ]
[ 2 7 ]
Apply:
det(A) = ad − bc
So:
det(A) = 5(7) − 3(2)
= 35 − 6
= 29
Therefore:
det(A) = 29
Because the determinant is nonzero, A has a matrix inverse.
Example With a Negative Determinant
Consider:
A = [ 1 4 ]
[ 3 2 ]
Then:
det(A) = 1(2) − 4(3)
= 2 − 12
= −10
The determinant is negative.
Its absolute value:
|−10| = 10
gives the area-scaling factor of the corresponding two-dimensional linear transformation.
The negative sign indicates that the transformation reverses orientation.
Example With Determinant Zero
Let:
A = [ 2 4 ]
[ 1 2 ]
Then:
det(A) = 2(2) − 4(1)
= 4 − 4
= 0
The second row is one-half of the first row, so the rows are linearly dependent.
The matrix is singular and cannot have an inverse.
Its matrix rank is less than 2.
Which Matrices Have Determinants?
A determinant is defined for square matrices.
Examples include:
1 × 1
2 × 2
3 × 3
n × n
A matrix such as:
2 × 3
does not have a determinant.
This is important because many matrix operations work with rectangular matrices, while determinant-based concepts such as ordinary invertibility require a square matrix.
Determinant of a 1×1 Matrix
For the matrix:
A = [a]
the determinant is simply:
det(A) = a
For example:
det([7]) = 7
This simple case is consistent with the recursive definition used for larger determinants.
Matrix Determinant Formula for a 3×3 Matrix
Let:
A = [ a b c ]
[ d e f ]
[ g h i ]
Expanding along the first row:
det(A) = a(ei − fh) − b(di − fg) + c(dh − eg)
The signs follow the pattern:
- − +
Each term multiplies one first-row entry by the determinant of its corresponding 2×2 minor.
3×3 Determinant Example
Find:
det(A)
for:
A = [ 1 2 3 ]
[ 0 4 5 ]
[ 1 0 6 ]
Expand along the first row:
det(A) = 1(4·6 − 5·0) − 2(0·6 − 5·1) + 3(0·0 − 4·1)
Calculate each part:
1(24) − 2(−5) + 3(−4)
= 24 + 10 − 12
= 22
Therefore:
det(A) = 22
Because 22 ≠ 0, the matrix is invertible.
Minors
A minor is obtained by deleting one row and one column from a matrix and taking the determinant of the smaller matrix that remains.
For a 3×3 matrix:
A = [ a b c ]
[ d e f ]
[ g h i ]
the minor corresponding to a is:
[ e f ]
[ h i ]
Its determinant is:
ei − fh
This is denoted conceptually as the minor of the entry in row 1, column 1.
Cofactors
A cofactor combines a minor with a sign.
The sign pattern for a 3×3 matrix is:
[ + − + ]
[ − + − ]
[ + − + ]
If Mᵢⱼ is the minor of entry aᵢⱼ, its cofactor is:
Cᵢⱼ = (−1)^(i+j) Mᵢⱼ
Cofactors allow a determinant to be expanded along any row or column.
Cofactor Expansion
For any chosen row i:
det(A) = Σ aᵢⱼCᵢⱼ
Likewise, expansion can be performed down any column.
The final determinant is the same regardless of which row or column is selected.
In practice, choose a row or column containing several zeros whenever possible because zero terms disappear immediately.
Example Expanding Along a Convenient Row
Consider:
A = [ 2 0 0 ]
[ 3 4 1 ]
[ 5 2 6 ]
Expanding along the first row:
det(A) = 2 det[ 4 1 ]
[ 2 6 ]
The other two terms vanish because their first-row entries are zero.
So:
det(A) = 2(4·6 − 1·2)
= 2(24 − 2)
= 44
Choosing the first row avoids unnecessary calculations.
Determinant of a Diagonal Matrix
For a diagonal matrix:
A = [ a 0 0 ]
[ 0 b 0 ]
[ 0 0 c ]
the determinant is simply:
det(A) = abc
For example:
A = [ 2 0 0 ]
[ 0 −3 0 ]
[ 0 0 5 ]
has:
det(A) = 2(−3)(5)
= −30
This rule extends to diagonal matrices of any size: multiply all diagonal entries.
Determinant of a Triangular Matrix
For any upper- or lower-triangular square matrix, the determinant equals the product of its diagonal entries.
For example:
A = [ 3 4 2 ]
[ 0 5 1 ]
[ 0 0 −2 ]
has:
det(A) = 3(5)(−2)
= −30
There is no need for a full cofactor expansion.
This property makes triangular forms particularly useful in determinant calculations.
Determinant of the Identity Matrix
The identity matrix I has 1s on its diagonal and 0s elsewhere.
Therefore:
det(I) = 1
For a 3×3 identity matrix:
det(I) = 1·1·1
= 1
This agrees with the identity transformation preserving area, volume, and orientation exactly.
Determinant and Row Swaps
Swapping two rows changes the sign of the determinant.
If:
det(A) = D
and B is obtained by exchanging two rows of A, then:
det(B) = −D
For example:
A = [ 1 2 ]
[ 3 4 ]
has:
det(A) = 4 − 6
= −2
Swap the rows:
B = [ 3 4 ]
[ 1 2 ]
Then:
det(B) = 6 − 4
= 2
The magnitude stays the same while the sign reverses.
Scaling One Row
If one row of a matrix is multiplied by scalar k, the determinant is multiplied by k.
For example:
A = [ 1 2 ]
[ 3 4 ]
has:
det(A) = −2
Multiply the first row by 5:
B = [ 5 10 ]
[ 3 4 ]
Then:
det(B) = 5(4) − 10(3)
= 20 − 30
= −10
And:
−10 = 5(−2)
as expected.
Adding a Multiple of One Row to Another
Replacing one row by itself plus a multiple of another row does not change the determinant.
For example, begin with:
A = [ 1 2 ]
[ 3 4 ]
whose determinant is:
−2
Replace row 2 with:
row 2 − 3(row 1)
The new matrix is:
B = [ 1 2 ]
[ 0 −2 ]
Its determinant is:
1(−2) − 2(0)
= −2
The determinant remains unchanged.
This property makes row reduction useful for larger determinant calculations.
Equal Rows Give Determinant Zero
If two rows of a square matrix are identical:
det(A) = 0
For example:
A = [ 2 5 ]
[ 2 5 ]
gives:
det(A) = 2(5) − 5(2)
= 0
More generally, linearly dependent rows or columns imply a zero determinant.
This is one connection between determinant and matrix rank.
Determinant of a Product
For square matrices of the same size:
det(AB) = det(A)det(B)
This is one of the most important determinant identities.
If:
det(A) = 3
and:
det(B) = −4
then:
det(AB) = 3(−4)
= −12
Notice that ordinary matrix multiplication may be complicated, yet its determinant factors into two scalar determinants.
Determinant of an Inverse
If A is invertible:
AA⁻¹ = I
Take determinants:
det(A)det(A⁻¹) = det(I)
Since:
det(I) = 1
we obtain:
det(A⁻¹) = 1/det(A)
For example, if:
det(A) = 5
then:
det(A⁻¹) = 1/5
This identity requires:
det(A) ≠ 0
because a singular matrix has no inverse.
Determinant of a Transpose
Transposing a square matrix does not change its determinant:
det(Aᵀ) = det(A)
Rows become columns, but the determinant value remains the same.
This reflects the symmetry between row and column properties in determinant theory.
Determinant of kA
For an n×n matrix:
det(kA) = kⁿ det(A)
This rule is commonly misunderstood.
For a 2×2 matrix:
det(kA) = k²det(A)
For a 3×3 matrix:
det(kA) = k³det(A)
Why? Multiplying the entire matrix by k scales every one of its n rows by k.
Each row scaling contributes one factor of k to the determinant.
Example of det(kA)
Suppose A is 2×2 and:
det(A) = 3
Then:
det(4A) = 4²det(A)
= 16(3)
= 48
It would be incorrect to write:
det(4A) = 4det(A)
for a 2×2 matrix.
The matrix dimension determines the exponent.
Determinant and Matrix Invertibility
For a square matrix A:
det(A) ≠ 0
if and only if A is invertible.
Therefore:
det(A) = 0 → no inverse
and:
det(A) ≠ 0 → inverse exists
This makes the determinant a quick test before attempting an inverse calculation.
A matrix with zero determinant is called singular.
A matrix with nonzero determinant is nonsingular.
Determinant and Matrix Rank
For an n×n matrix:
det(A) ≠ 0
means:
rank(A) = n
So the matrix has full rank.
If:
det(A) = 0
then:
rank(A) < n
The determinant therefore detects whether a square matrix loses at least one independent dimension.
However, the determinant alone does not tell you the exact rank once the value is zero.
Determinant and Systems of Linear Equations
Consider the square system:
Ax = b
If:
det(A) ≠ 0
then A is invertible, and the system has exactly one solution for every b:
x = A⁻¹b
If:
det(A) = 0
a unique solution is not guaranteed. Depending on b, the system may have no solution or infinitely many solutions.
This links the determinant directly with a system of linear equations.
2×2 System Example
Consider:
2x + y = 5
x + 3y = 7
The coefficient matrix is:
A = [ 2 1 ]
[ 1 3 ]
Its determinant is:
det(A) = 2(3) − 1(1)
= 5
Because:
5 ≠ 0
the system has a unique solution.
The determinant test establishes uniqueness before solving the equations.
Determinant and Eigenvalues
For an n×n matrix with eigenvalues:
λ₁, λ₂, …, λₙ
counting algebraic multiplicity:
det(A) = λ₁λ₂…λₙ
For example, if the eigenvalues are:
2, 3, −1
then:
det(A) = 2(3)(−1)
= −6
This identity is also why a zero eigenvalue makes a matrix singular.
If any λᵢ = 0, their product is zero.
Eigenvectors and Geometric Scaling
An eigenvector identifies a direction that a matrix transformation preserves up to scaling:
Av = λv
The determinant combines the overall scaling behavior across all independent dimensions.
For a diagonal matrix whose diagonal entries are its eigenvalues:
A = diag(λ₁, …, λₙ)
the determinant is visibly:
λ₁λ₂…λₙ
This provides an intuitive bridge between directional scaling and total area or volume scaling.
Geometric Meaning in Two Dimensions
Suppose A transforms a unit square into a parallelogram.
The original square has area:
1
The transformed parallelogram has area:
|det(A)|
Thus:
area scaling factor = |det(A)|
If:
det(A) = 3
area is multiplied by 3.
If:
det(A) = −3
area is still multiplied by 3, but orientation is reversed.
If:
det(A) = 0
the square collapses into a line or a point and has zero area.
Geometric Meaning in Three Dimensions
For a 3×3 matrix, the absolute determinant gives the volume-scaling factor.
If:
det(A) = 5
a region with volume 2 is transformed into a region with volume:
5 × 2 = 10
If:
det(A) = 0
three-dimensional volume collapses to zero.
The transformed object lies within a lower-dimensional subset.
Determinant Sign and Orientation
The sign of the determinant carries geometric information.
If:
det(A) > 0
orientation is preserved.
If:
det(A) < 0
orientation is reversed.
Reflection matrices provide common negative-determinant examples.
For reflection across the x-axis:
A = [ 1 0 ]
[ 0 −1 ]
we have:
det(A) = −1
Lengths and area magnitudes may be preserved while orientation is reversed.
Cross Product and Determinants
In three dimensions, determinants are closely related to the cross product.
The magnitude:
|a × b|
gives the area of the parallelogram spanned by a and b.
Determinant-based formulas also encode oriented area and volume.
For three vectors, the scalar triple product can be expressed as a 3×3 determinant and gives signed parallelepiped volume.
This geometric connection helps explain why determinants measure multidimensional scaling.
Determinant and Change of Basis
A matrix representation depends on the chosen basis, a concept developed through basis and dimension.
When a linear operator is represented in another basis using a similarity transformation:
B = P⁻¹AP
its determinant remains unchanged:
det(B) = det(P⁻¹)det(A)det(P)
Since:
det(P⁻¹)det(P) = 1
we obtain:
det(B) = det(A)
The determinant therefore reflects an intrinsic property of the operator rather than one arbitrary coordinate representation.
Determinant and Matrix Operations
The wider family of matrix operations includes addition, multiplication, inversion, scalar multiplication, transposition, and row operations.
Determinants interact differently with each operation.
For example:
det(AB) = det(A)det(B)
but generally:
det(A + B) ≠ det(A) + det(B)
The determinant must therefore be manipulated according to its own rules rather than ordinary scalar intuition.
Determinant of a Sum
There is no general formula:
det(A + B) = det(A) + det(B)
For example, take the 2×2 identity matrix:
A = I
B = I
Then:
det(A) = 1
det(B) = 1
so:
det(A) + det(B) = 2
But:
A + B = 2I
and:
det(2I) = 4
Therefore:
det(A + B) = 4 ≠ 2
This is an important distinction from the multiplicative determinant rule.
Determinant Versus Linear Approximation
A linear approximation uses derivative information to approximate a nonlinear function locally.
A matrix determinant is an exact scalar property of a square matrix.
The two concepts interact in advanced multivariable settings because local derivative matrices can approximate nonlinear transformations, and their determinants can describe local area or volume scaling.
However, calculating an ordinary matrix determinant requires no approximation.
Determinant by Row Reduction
For larger matrices, row reduction can simplify determinant calculation.
Three row-operation rules are essential:
swap two rows → multiply determinant by −1
multiply one row by k → multiply determinant by k
add a multiple of one row to another → determinant unchanged
A matrix can be reduced to triangular form, after which the determinant is the product of diagonal entries adjusted for swaps and row scalings.
This is often more efficient than a large cofactor expansion.
Example Using Row Reduction
Consider:
A = [ 1 2 3 ]
[ 2 5 7 ]
[ 1 0 4 ]
Use:
R₂ → R₂ − 2R₁
This gives:
[ 1 2 3 ]
[ 0 1 1 ]
[ 1 0 4 ]
Then:
R₃ → R₃ − R₁
giving:
[ 1 2 3 ]
[ 0 1 1 ]
[ 0 −2 1 ]
Now:
R₃ → R₃ + 2R₂
giving:
[ 1 2 3 ]
[ 0 1 1 ]
[ 0 0 3 ]
Only row-addition operations were used, so the determinant was unchanged.
Multiply the diagonal:
det(A) = 1·1·3
= 3
Determinant and Zero Rows
If a square matrix contains an all-zero row or column:
det(A) = 0
For a triangular matrix, this is immediately visible because the diagonal necessarily contains zero after appropriate dependence is exposed.
A zero row also makes it clear that the matrix cannot have full rank.
Determinant and Proportional Rows
Suppose:
R₂ = 3R₁
Then the rows are dependent and:
det(A) = 0
For example:
A = [ 1 2 ]
[ 3 6 ]
has:
det(A) = 6 − 6
= 0
The corresponding transformation collapses the plane onto a lower-dimensional set.
Common Matrix Determinant Mistakes
The most common 2×2 error is reversing the subtraction:
bc − ad
instead of:
ad − bc
For 3×3 cofactor expansion, sign errors are common. The first-row pattern is:
- − +
Another mistake is calculating a determinant for a rectangular matrix. Ordinary determinants apply only to square matrices.
Students may also forget that swapping rows reverses the determinant sign.
Scaling an entire n×n matrix by k multiplies the determinant by kⁿ, not merely by k.
It is also incorrect to assume that:
det(A + B) = det(A) + det(B)
Finally, a determinant of zero does not mean the matrix contains only zeros. It means its rows or columns are linearly dependent and the associated square transformation loses dimension.
Frequently Asked Questions
What is a matrix determinant?
A matrix determinant is a scalar calculated from a square matrix that describes properties including invertibility, dimensional collapse, and area or volume scaling.
What is the determinant formula for a 2×2 matrix?
For:
A = [ a b ]
[ c d ]
the determinant is:
det(A) = ad − bc
What does determinant zero mean?
It means the matrix is singular, has no inverse, is not full rank, and collapses at least one independent direction.
What does a nonzero determinant mean?
It means a square matrix is invertible and has full rank.
Can a rectangular matrix have a determinant?
Not in the ordinary determinant sense. The determinant is defined for square matrices.
What is the determinant of a triangular matrix?
It is the product of the diagonal entries.
What happens to the determinant when two rows are swapped?
Its sign reverses.
What happens when one row is multiplied by k?
The determinant is multiplied by k.
Does adding a multiple of one row to another change the determinant?
No.
What is det(AB)?
For square matrices:
det(AB) = det(A)det(B)
What is the determinant of an inverse?
If A is invertible:
det(A⁻¹) = 1/det(A)
How are eigenvalues related to the determinant?
The determinant equals the product of the eigenvalues when algebraic multiplicities are counted.
What does the determinant mean geometrically?
Its absolute value is the area- or volume-scaling factor of the corresponding linear transformation. Its sign records orientation.
How can I check a determinant calculation?
For a 2×2 matrix, recompute ad − bc. For larger matrices, try a second expansion or row-reduction approach, and check whether structural conclusions such as invertibility are consistent with the result.



