{"id":1918,"date":"2021-06-22T17:27:15","date_gmt":"2021-06-22T17:27:15","guid":{"rendered":"http:\/\/192.168.31.181\/muthu\/?p=1918"},"modified":"2021-06-23T01:30:40","modified_gmt":"2021-06-23T01:30:40","slug":"demystifying-determinant-of-a-matrix","status":"publish","type":"post","link":"http:\/\/write.muthu.co\/demystifying-determinant-of-a-matrix\/","title":{"rendered":"Demystifying Determinant of a Matrix"},"content":{"rendered":"\n

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.<\/p>\n\n\n\n

\"\"
The above formula gives the determinant of a 2X2 matrix.<\/figcaption><\/figure>\n\n\n\n

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.<\/p>\n\n\n\n

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

\"\"<\/figure>\n\n\n\n

which can also be represented as a matrix given by,<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

whose determinant is represented as (as per the formula we learn in school),<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

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.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

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.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

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. <\/p>\n\n\n\n

\\(Area(A1) = \\frac{1}{2} \\times (x2 – x1) \\times (y1-y2)\\)<\/p>\n\n\n\n

\\(Area(A2) = \\frac{1}{2} \\times x2 \\times y2 \\)<\/p>\n\n\n\n

\\(Area(A3) = \\frac{1}{2} \\times x1 \\times y1 \\)<\/p>\n\n\n\n

\\(Area(Rect) = x2 \\times y1 \\)
<\/p>\n\n\n\n

So, based on our definition of Determinant using areas we get,<\/p>\n\n\n\n

\\(Det(A) = 2 \\times ( Area(Rect) – Area(A1) – Area(A2) – Area(A3) ) \\)<\/p>\n\n\n\n

if we expand the right side of the equation completely we get, <\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Now that we know the geometric idea behind our determinant, the rest of the inferences related to determinants become obvious. <\/p>\n\n\n\n

What is the meaning of Zero determinant?<\/h3>\n\n\n\n

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.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

What is the meaning of Negative determinant?<\/h3>\n\n\n\n

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:<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

What about 3×3 or bigger matrices?<\/h3>\n\n\n\n

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.<\/p>\n\n\n\n

\"\"<\/figure>\n\n\n\n

Though we learned how to compute the determinants of 4 and more dimensional matrices, we rarely use them in real world applications.<\/p>\n","protected":false},"excerpt":{"rendered":"

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 […]<\/p>\n","protected":false},"author":1,"featured_media":1923,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"_links":{"self":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/1918"}],"collection":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/comments?post=1918"}],"version-history":[{"count":13,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/1918\/revisions"}],"predecessor-version":[{"id":1946,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/posts\/1918\/revisions\/1946"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/media\/1923"}],"wp:attachment":[{"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/media?parent=1918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/categories?post=1918"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/write.muthu.co\/wp-json\/wp\/v2\/tags?post=1918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}