# Matrix Determinant Calculator

Created by Maciej Kowalski, PhD candidate
Reviewed by Anna Szczepanek, PhD and Jack Bowater
Last updated: Dec 03, 2022

Welcome to the matrix determinant calculator, where you'll have a chance to compute, well, matrix determinants, using the easy to use determinant formula for any square matrix up to 4×4 in size. Also, we'll look into some of the basic properties of determinants that can help solve larger ones, such as the determinant of a 4×4 matrix.

"What is a determinant, and why should I care?" We'll show you the determinant definition in a little while, but let's just say that, among other uses, it is extremely helpful when dealing with systems of equations - check our system of equations calculator for more details. Basically, how to solve a system of three equations is the same as how to find the determinant of a 3×3 matrix.

Convinced? Encouraged? Excited? Let's move on then, shall we?

## What is a determinant?

Why don't we start with what a matrix is? Believe it or not, it's not only the sci-fi classic from the '90s. In mathematics, it's the name we give to an array of elements (usually numbers) with a set number of rows and columns. An example of a matrix is:

$A = \begin{bmatrix} 3 & -1 \\ 0 & 2\\ 1 & -1 \end{bmatrix}$

As you can see, the numbers are arranged between two big square brackets, $[$ and $]$. Also, we say that, for example, the number $2$ is in the cell in the second row and the second column.

The determinant definition states that it is a number that is obtained by multiplying and adding the cells of a square matrix according to a given rule. Let's take a closer look at a few important things here.

• As the determinant definition suggests, we need to have a square matrix to even start the calculations. This means that we can find the determinant of a 2×2 matrix or the determinant of a 4×4 matrix, but not, for example, of something that looks like the $A$ above, which is a 3×2 (three rows and two columns) matrix;
• The determinant formula for larger matrices gets quite complicated. Its number of summands is equal to the number of permutations of the number that is the matrix's side. This means that the determinant of a 2×2 matrix has only two summands, but for 5×5 matrices, we get 120 summands;
• There are ways to make the calculations easier. For example, finding the determinant of a 4×4 matrix can be changed into the problem of how to find the determinant of a 3×3 matrix. We'll look into some such properties of determinants in "Properties of determinants" section; and
• The determinant of a matrix, $A$, is denoted by $|A|$ (simply replace the square brackets of a matrix with vertical lines $|$) or $\det(A)$. Do not mistake the first notation with the absolute value! In general, the determinant can be a negative number.

So, what is a determinant? It's a number; we've learned that much. But why is it useful? Where does it appear?

The matrix determinant is an extremely helpful and often-used tool in linear algebra. Whenever we have a matrix and want to understand it, the determinant is one of the first things we turn to. For instance, every system of linear equations can be described by a matrix. Its determinants help us find the solution, for example, by using Cramer's rule, which you can find in our Cramer's rule calculator. Moreover, when we use matrices to describe a linear transformation, it's often best to diagonalize them. How do we do that? With determinants, of course.
The determinant of a matrix also tells us whether the matrix has an inverse and whether the inverse must be approximated with the Moore-Penrose pseudoinverse.
Lastly, we usually need the eigenvalues of such a transformation. Yes, you guessed it - for that, we also use determinants.

🙋 To find eigenvalues and the corresponding eigenvectors of any matrix, feel free to use Omni's eigenvalue and eigenvector calculator

Hopefully, we've managed to convince you that it's worthwhile to learn the determinant definition. But how do we calculate it? Is there some short, neat determinant formula for everyday use?

## The general determinant formula

Before we see some specific examples, like how to find the determinant of a 3×3 matrix, let's take a look at the monstrosity that is the general determinant definition.

Let $A$ be a square matrix of size $n$, where $n$ is some natural number. Denote the cells of $A$ by $a_{i,j}$, where $i$ is the number of the row, and $j$ is the number of the column. Then:

$|A| = \sum(-1)^{\mathrm{sgn}(\sigma)}\prod a_{i,\sigma(i)},$

where:

• $\sum$ is the sum of all permutations of the set $\{1,2\ldots,n\}$; and
• $\prod$ is the product of $i$-s from $1$ to $n$.

Pretty, isn't it? If we translate the funny symbols into something more understandable, it means more or less this:

💡 To calculate the determinant, look at your matrix, take $n$ numbers, one from each row and every column, and multiply them together. Take all such $n$-tuples, change their sign sometimes, and sum it all up.

Don't worry; now that we've put this general determinant definition out into the open, we'll not think about it anymore. We'll stick to the easy cases, where the matrix is not too big, to show what it really means.