I watched an interesting YouTube video explaining how to use matrices and determinants to find the area of a triangle given its vertices. Of course, one could use the distance formula to find the lengths of the sides and then use Heron's formula to find the area but this method is far quicker as we'll see.
The first example used in the video involved the points (1,1), (4,1) and (4,5). These coordinates are used to form a 3 x 3 matrix with the x coordinates forming the first column, the y coordinates forming the second column, and the third column consisting of three 1's. The result is as shown below:[111411451]
![]() |
Figure 1: f = 3 units and g = 4 units and so area is 3 x 4 / 2 = 6 square units |
Here is a permalink to a SageMath algorithm that will calculate the area form the coordinates of the input vertices. The second example in the video involved the vertices (2, 3), (5, 7) and (10, -5). This produces the following matrix:[23157110−51]
![]() |
Figure 2 |
The video goes through the process of finding the lengths of f, g and h using the Pythagorean theorem and then using Heron's formula to find the area. This is done to confirm that matrix/determinant method actually works so I won't reproduce that here. Suffice to say that once the matrix M is constructed, we can say that:Area of Triangle =12× det |M|
No comments:
Post a Comment