# Part 20 : Determinants

Published in

We learned about minors and cofactors in Part 19.

Now, we calculate determinant of any (square) matrix using Laplace Expansion.

For any square matrix, Laplace Expansion is the weighted sum of cofactors i.e. if we calculate cofactors of all the elements from any row or column, multiply them with their corresponding elements (scalar multiplication) and add those products together then we will get the determinant of that matrix.

We will look at each step briefly by calculating determinant of matrix A, a matrix of order n x n.

# Step 1

Select any row or column and calculate cofactors of all the elements in that row or column.

We select the first row, the cofactors calculated from first row are

Each cofactor is a sub matrix of order (n-1) x (n-1) that could be decomposed to a single scalar value (How? Read Part 19).

# Step 2

Multiply each cofactor with its corresponding element.

The products obtained will be like

# Step 3

Add all the products obtained in step 2. This the determinant of our n x n matrix.

Determinant of matrix A will be represented as |A|.

# Example

Consider a matrix B of order 3 x 3.

To find the determinant of matrix B

Step 1: Calculate cofactors of any row or column of matrix B. Here, we chose first row.

Step 2: Multiply cofactors with their corresponding elements.

Step 3: Add products obtained from step 2.

The value of determinant of matrix B is 0. Thus, matrix B is a singular matrix and such matrices are not inversible.

Note : The computational cost of calculating determinant of increases really fast with increase in order of matrix because the cofactors have to be expanded further in Laplace Expansion in order to obtain scalar values.

You can view the complete series here
I’m now publishing at avni.sh