# Jorge Valle Jorge Valle is a front end developer with a particular passion for, and expertise in, JavaScript and user interfaces. Lately, he's also been diving into machine learning.

# Finding the determinant of a 2 x 2 matrix

## Index

Finding the determinant of a square matrix, both mathematically, and programmatically using Numpy.

## Matrices used

Here are the 2 matrices that I will be referring to.

## The determinant

To find the determinant, we first identify the elements of the matrix as such.

Then, we get the products of the diagonals, and subtract the product of the off-diagonal from the product of the main diagonal.

This yields a single number: the determinant.

## Singular matrices

Now, let's calculate the determinant of B.

This results in a determinant of 0, which tells us that the matrix B is singular. Singular matrices have no inverses.

## Numpy implementation

Here are the above calculations, implemented in Numpy. Even though the linear algebra package makes this trivially easy, it's cool to understand the maths behind it. 