Determinant

The **determinant** of a square matrix is a scalar (a number) that indicates how that matrix behaves. It can be calculated from the numbers in the matrix.

The determinant of the matrix  is written as  or  in a formula. Sometimes, instead of  and , one simply writes  and .

## Interpretation

There are a few ways to understand what the determinant says about a matrix.

### Geometric interpretation

An  matrix can be seen as describing a linear map in  dimensions. In which case, the determinant indicates the factor by which this matrix scales (grows or shrinks) a region of -dimensional space.

For example, a  matrix , seen as a linear map, will turn a square in 2-dimensional space into a parallelogram. That parallellogram's area will be  times as big as the square's area.

In the same way, a  matrix , seen as a linear map, will turn a cube in 3-dimensional space into a parallelepiped. That parallelepiped's volume will be  times as big as the cube's volume.

The determinant can be negative or zero. A linear map can stretch and scale a volume, but it can also reflect it over an axis. Whenever this happens, the sign of the determinant changes from positive to negative, or from negative to positive. A negative determinant means that the volume was mirrored over an odd number of axes.

### "System of equations" interpretation

One can think of a matrix as describing a system of linear equations. That system has a unique non-trivial solution _exactly_ when the determinant is not 0 (_non-trivial_ meaning that the solution is not just all zeros).

If the determinant is zero, then there is either no unique non-trivial solution, or there are infinitely many.

## Singular matrices

A matrix has an inverse matrix exactly when the determinant is not 0. For this reason, a matrix with a non-zero determinant is called **invertible**. If the determinant is 0, then the matrix is called **non-invertible** or **singular**.

Geometrically, one can think of a singular matrix as "flattening" the parallelepiped into a parallelogram, or a parallelogram into a line. Then the volume or area is 0, which means that there is no linear map that will bring the old shape back.

## Calculating a determinant

There are a few ways to calculate a determinant.

### Formulas for small matrices

- For  and  matrices, the following simple formulas hold:

- For  matrices, the formula is:
- One can use the Rule of Sarrus (see image) to remember this formula.

### Cofactor expansion

For larger matrices, the determinant is harder to calculate. One way to do it is called **cofactor expansion**.

Suppose that we have an  matrix . First, we choose any row or column of the matrix. For each number  in that row or column, we calculate something called its **cofactor** . Then .

To compute such a cofactor , we erase row  and column  from the matrix . This gives us a smaller  matrix. We call it . The cofactor  then equals .

Here is an example of a cofactor expansion of the left column of a  matrix:

As illustrated above, one can simplify the computation of determinant by choosing a row or column that has many zeros; if  is 0, then one can skip calculating  altogether.

## Related pages

- Invertible matrix
- Volume