Demystifying Determinant of a Matrix

I was first introduced to the idea of Matrices and determinants in my high school linear algebra class. Back then my only goal was to remember how to compute them using the given formulas. When I visited the determinants again after many years for one of my computer vision projects, It became clear I had to understand the intuition behind determinants.

The above formula gives the determinant of a 2X2 matrix.

In school, we learned about the different properties of determinants and what they indicate about the matrix, like the meaning of negative, positive, and zero determinants. Those are too abstract and make no sense unless you start visualizing a determinant in your head which is what this article is about.

Let’s consider two vectors A1(x1,y1) and A2(x2,y2) plotted on a graph as shown below.

which can also be represented as a matrix given by,

whose determinant is represented as (as per the formula we learn in school),

A determinant is nothing but the area of the parallelogram drawn using the vectors A1 and A2 with the origin as shown in the diagram below. This is not exactly the definition that is taught in schools which is why it is so difficult to understand determinants.

So, what exactly did we do here? We drew two more lines one parallel to vector a1 and another one parallel to a2. There are many ways to find the area of the parallelogram, we will try to find the area of the triangle enclosed by a1,a2, and origin and then multiply it by 2 to get the area of the parallelogram. See the below image.

The area of the triangle is the sum of the entire rectangle enclosing the triangle minus the sum area of the different regions A1, A2 and A3. Let’s try and get our original school formula through this method.

\(Area(A1) = \frac{1}{2} \times (x2 – x1) \times (y1-y2)\)

\(Area(A2) = \frac{1}{2} \times x2 \times y2 \)

\(Area(A3) = \frac{1}{2} \times x1 \times y1 \)

\(Area(Rect) = x2 \times y1 \)

So, based on our definition of Determinant using areas we get,

\(Det(A) = 2 \times ( Area(Rect) – Area(A1) – Area(A2) – Area(A3) ) \)

if we expand the right side of the equation completely we get,

Now that we know the geometric idea behind our determinant, the rest of the inferences related to determinants become obvious.

What is the meaning of Zero determinant?

When our determinant is Zero, it means the area of the parralellogram is also zero, which most likely means the two vectors are either the same or they lie on the same line to each other as shown below.

What is the meaning of Negative determinant?

We know that an area will either be positive or zero but we do get a negative determinant in many cases. Does that mean our area is negative? Not exactly, a negative determinant only means that the orientation of space is reversed. Take a look at the example below:

What about 3×3 or bigger matrices?

A 2X2 matrix represents a 2-dimensional space as we only have x and y-axis values, as we move up to the 3×3 matrix we have Z-axis also which takes us to the 3rd dimension. A determinant of a 3×3 matrix given by vectors r1, r2, and r3 is the volume of a parallelepiped as shown below.

Though we learned how to compute the determinants of 4 and more dimensional matrices, we rarely use them in real world applications.