Matrix Determinant Calculator

Hello there!

Please provide your input and click the calculate button
Show Solution Hide Solution

About the Matrix Determinant Calculator

The determinant calculator calculates the determinant of a square matrix of order 10\hspace{0.2em} 10 \hspace{0.2em} and below.

Usage Guide

Show Hide

i. Valid Inputs

The size of the square matrix can be any positive integer from 1\hspace{0.2em} 1 \hspace{0.2em} to 10\hspace{0.2em} 10 \hspace{0.2em}.

Each element in the matrix can be a real number in any format — integers, decimals, fractions, or even mixed numbers. Here are a few examples.

  • Whole numbers or decimals → 2\hspace{0.2em} 2 \hspace{0.2em}, 4.25\hspace{0.2em} -4.25 \hspace{0.2em}, 0\hspace{0.2em} 0 \hspace{0.2em}, 0.33\hspace{0.2em} 0.33 \hspace{0.2em}
  • Fractions → 2/3\hspace{0.2em} 2/3 \hspace{0.2em}, 1/5\hspace{0.2em} -1/5 \hspace{0.2em}
  • Mixed numbers → 51/4\hspace{0.2em} 5 \hspace{0.5em} 1/4 \hspace{0.2em}

ii. Example

If you would like to see an example of the calculator's working, just click the "example" button.

iii. Share

We would love to see you share our calculators with your family, friends, or anyone else who might find it useful.

By checking the "include calculation" checkbox, you can share your calculation as well.


Here's a quick overview of the concept of determinants.

What Is a Determinant?

A determinant is a unique scalar value associated with a square matrix and is a function of the elements of the matrix. It is common denoted as det(A)\hspace{0.2em} \text{det} (A) \hspace{0.2em} or A\hspace{0.2em} |A| \hspace{0.2em}, A\hspace{0.2em} A \hspace{0.2em} being the relevant matrix.

Determinant of a 2×2\hspace{0.2em} 2 \times 2 \hspace{0.2em} Matrix

By definition, the determinant of a 2×2\hspace{0.2em} 2 \times 2 \hspace{0.2em} matrix is the difference between the products of the elements along the main diagonal ↘ and those along the antidiagonal ↙.

Let me explain. Consider the matrix below.

A=[abcd]A \hspace{0.25em} = \hspace{0.25em} \begin{bmatrix} a & b\\ c & d \end{bmatrix}

The determinant for the matrix above would be

A=adbc|A| = ad - bc

Determinants of Larger Matrices

Before extending the idea of determinants to matrices of a higher order, it's helpful to understand what we mean by the terms "minor" and "cofactor" mean.

Minors and Cofactors

Consider the determinant below. aij\hspace{0.2em} a_{ij} \hspace{0.2em} represents the element in the ith\hspace{0.2em} i^{\text{th}} \hspace{0.2em} row and jth\hspace{0.2em} j^{\text{th}} \hspace{0.2em} column.

a11a12a13a1na21a22a23a2na31a32a33a3nan1an2an3ann \begin{vmatrix} a_{11} & a_{12} & a_{13} & \cdots & a_{1n} \\ a_{21} & a_{22} & a_{23} & \cdots & a_{2n} \\ a_{31} & a_{32} & a_{33} & \cdots & a_{3n} \\ \vdots & \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n2} & a_{n3} & \cdots & a_{nn} \\ \end{vmatrix}

Now the minor corresponding to the element aij\hspace{0.2em} a_{ij} \hspace{0.2em} is the smaller determinant obtained by omitting the the ith\hspace{0.2em} i^{\text{th}} \hspace{0.2em} row and jth\hspace{0.2em} j^{\text{th}} \hspace{0.2em} column of the original matrix.

So the minor corresponding to the element a22\hspace{0.2em} a_{22} \hspace{0.2em} (denoted by M22\hspace{0.2em} M_{22} \hspace{0.2em}) would be —

M22=a11a13a1na31a33a3nan1an3annM_{22} \hspace{0.25em} = \hspace{0.25em} \begin{vmatrix} a_{11} & a_{13} & \cdots & a_{1n} \\ a_{31} & a_{33} & \cdots & a_{3n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{n1} & a_{n3} & \cdots & a_{nn} \\ \end{vmatrix}

Cofactor of an element aij\hspace{0.2em} a_{ij} \hspace{0.2em} is defined as —

Cij=(1)(i+j)MijC_{ij} \hspace{0.25em} = \hspace{0.25em} (-1)^{(i + j)} \cdot M_{ij}

So the cofactor of a22\hspace{0.2em} a_{22} \hspace{0.2em} would be

C22=(1)(2+2)M22=M22\begin{align*} C_{22} \hspace{0.25em} &= \hspace{0.25em} (-1)^{(2 + 2)} \cdot M_{22} \\[1em] &= \hspace{0.25em} M_{22} \end{align*}

Laplace Expansion

To calculate the value of a determinant larger than 2×2\hspace{0.2em} 2 \times 2 \hspace{0.2em}, we pick one row (or column) and add the products of each element in that row (or column) with its cofactor.

So for a square matrix of order n\hspace{0.2em} n \hspace{0.2em}, the determinant is given by the formula

A=j=1naijCij|A| \hspace{0.25em} = \hspace{0.25em} \sum_{j = 1}^{n} a_{ij} \hspace{0.15em} C_{ij}

Here, i\hspace{0.2em} i \hspace{0.2em} can take integral value from 1\hspace{0.2em} 1 \hspace{0.2em} to n\hspace{0.2em} n \hspace{0.2em}.

This method is known as Laplace expansion along one particular row or column.

Determinant Calculation — Example

Example

Calculate the determinant of the matrix below.

A=[724150392]A \hspace{0.25em} = \hspace{0.25em} \begin{bmatrix} 7 & 2 & 4 \\ -1 & 5 & 0\\ 3 & 9 & -2 \end{bmatrix}

Solution

To calculate the determinant of this 3×3\hspace{0.2em} 3 \times 3 \hspace{0.2em} matrix, let's go with Laplace expansion along the second row. Why we choose the second row will make sense in a moment.

So let's calculate the cofactors for each of the elements in the second row. We start with the cofactor of a21\hspace{0.2em} a_{21} \hspace{0.2em}.

C21=(1)(2+1)2492=1(2×2+4×9)=32\begin{align*} C_{21} \hspace{0.25em} &= \hspace{0.25em} (-1)^{(2 + 1)} \cdot \begin{vmatrix} 2 & 4 \\ 9 & -2 \end{vmatrix} \\[1.5em] &= \hspace{0.25em} -1 \cdot (2 \times -2 + 4 \times 9) \\[1.5em] &= \hspace{0.25em} -32 \end{align*}

Similarly, the cofactor of a22\hspace{0.2em} a_{22} \hspace{0.2em}

C22=(1)(2+2)7432=1(7×2+4×3)=2\begin{align*} C_{22} \hspace{0.25em} &= \hspace{0.25em} (-1)^{(2 + 2)} \cdot \begin{vmatrix} 7 & 4 \\ 3 & -2 \end{vmatrix} \\[1.5em] &= \hspace{0.25em} 1 \cdot (7 \times -2 + 4 \times 3) \\[1.5em] &= \hspace{0.25em} -2 \end{align*}

We don't need to calculate C23\hspace{0.2em} C_{23} \hspace{0.2em} because as you'll see, it will get multiplied with 0\hspace{0.2em} 0 \hspace{0.2em} and hence won't matter. and that's precisely why we selected the second row for expansion — less calculation.

Now, as we learned earlier to calculate the determinant, we add the products of each element in the row (or column) with its cofactor. So,

A=a21C21+a22C22+a23C23=1(32)+5(2)+0C23=32+10+0=22\begin{align*} |A| \hspace{0.25em} &= \hspace{0.25em} a_{21} \cdot C_{21} + a_{22} \cdot C_{22} + a_{23} \cdot C_{23} \\[1em] &= \hspace{0.25em} -1 \cdot (-32) + 5 \cdot (-2) + 0 \cdot C_{23} \\[1em] &= \hspace{0.25em} 32 + -10 + 0 \\[1em] &= \hspace{0.25em} 22 \end{align*}

And that's it.

Share  via

Include calculation