Area of Quadrilateral using Matrix Transformations and Determinants

226 Views Asked by At

I was working on creating a formula (just in experimentation) that would calcualte the area of any quadrilateral using some basic concepts from linear algebra.

The idea is that given a set of 4 coordinates that are the coordinates of the corners of the quadrilateral, you could then translate the quadrilateral so that you have a quadrilateral centered on the origin with three other pairs of coordinates.

The idea was to use a determinant to calculate the area of the qaudrilateral by describing the quadrilateral to be a transformation of the unit square. However, a quadrilateral is cannot necessarily be represented by a linear transformation, as it may not preserve the linearity of the plane when transformed.

If there is a way to describe a prallelogram (that can be described as a linear transformation of the unit square) that is related to the quadrilateral by some factor of area (ie, for example, 1/4 times some parallelogram is necessarily equal to the area of the quadrilateral).

That may sound a little confusing, but if it is possible to find the area of some parallelogram that then gives us information about the area of the quadrilateral, finding the area of the paralellogram by using a determinant and a matrix of the two vectors that are the coordinates of the parallelogram.

For example, the area of a paralellogram with a vertice on the origin, and two more vertices at the points (a,b) and (c,d), with a third vertice at (a+c,b+d). (The third vertice is necessarily that if the two other vertices are (a,b) and (c,d) ), can be represented by the determinant of the matrix

\begin{bmatrix}a&c\\b&d\end{bmatrix}

Given any triangle, by tiling it twice you can create a parallelogram (by orienting the triangles in a certain way).

If possible, how many different quadrilaterals would you need to tile to create a parrallelogram, for any given quadrilateral?

If so, we could say that if a quadrilateral tiled n to create a paralellogram. The area of the quadrilateral is 1/n times the area of the parallelogram.

2

There are 2 best solutions below

2
On BEST ANSWER

You may be better off generating a parallelogram within a single quadrilateral. Simply connect the midpoints of the sides in rotational order. The parallelogram thus obtained has half the area of the original quadrilateral, regardless of the shape of the latter figure.

Divide and Conquer

How does that work? Let $Q$ be any quadrilateral and $P$ be the parallelogram defined by the midpoints of the sides of $Q$. Divide the plane in half along a diagonal of $Q$, choosing the diagonal through the concave vertex if such exists.

Then the area of $Q$ is divided into two triangular areas. Taking the base to lie along the dividing line, the area of $Q$ is then measured by half the length of the dividing diagonal tines the sum of the triangle altitudes.

Meanwhile the area of $P$ is divided into two parallelogram areas because the sides of $P$ are constructed parallel to the diagonals of $Q$, and the base of $P$ may also be rendered along the dividing line. Then this base measures half the dividing diagonal inside $Q$ and the corresponding altitude measures half the sum of the triangle altitudes, from which the area of $P$ works out to half the previously rendered area of $Q$.

0
On

Using the fact from Oscar Lanzi's answer, that the area of the inscribed paralellogram is equal to half of the quadrilateral it inscribes, we can do the following.

Assume there exists a quadrilateral with coordinates ($x_1$,$y_1$), ($x_2$,$y_2$), ($x_3$, $y_3$), ($x_4$, $y_4$). Choose an arbitrary side of this quadrilateral. For this answer, we shall use the side bounded by the points $(x_1, y_1)$ and $(x_4, y_4)$. The midpoint of this side is located at the point $(\frac{x_1+x_4}{2} , \frac{y_1+y_4}{2})$. Call this point $M$.

Now, to find the location of the three other vertices, we can simply find the midpoints of the other sides. These will be found at the points $(\frac{x_1+x_2}{2} , \frac{y_1+y_2}{2})$, $(\frac{x_2+x_3}{2} , \frac{y_2+y_3}{2})$, and $(\frac{x_3+x_4}{2} , \frac{y_3+y_4}{2})$

Now we want to translate the entire quadrilateral such that $M$ lies on the origin. This can be done by subtracting the $x$ value of $M$ from the $x$ values of all the corners of the quadrilateral, and the $y$ value of $M$ from the $y$ values of all the corners of the quadrilateral. However, we do not necessarily care about the locationa of the corners of the quadrilateral, only the locations of the corners of the inscribed paralellogram.

Now that $M$ rests on the origin, we can find the locations of the other three corners of the inscribed paralellogram. For the sanity of future calculations, we shall give these points names. These will be $(\frac{x_1+x_2}{2}-\frac{x_1+x_4}{2}$,$\frac{y_1+y_2}{2}-\frac{x_1+x_4}{2}) = a$, $(\frac{x_2+x_3}{2}-\frac{x_1+x_4}{2}$,$\frac{y_2+y_3}{2}-\frac{x_1+x_4}{2}) =c$, and $(\frac{x_3+x_4}{2}-\frac{x_1+x_4}{2}$,$\frac{y_3+y_4}{2}-\frac{x_1+x_4}{2}) =c$.

We can think of the points $a$ and $b$ as vectors $\hat a$ and $\hat b$. It becomes obvious that the point $c$ can be represented as a vector addition $\hat a + \hat b$.

This paralellogram can now be understood as a linear transformation of the unit square. Specifically, the matrix that represents this transformation (after substituting back for the coordinates of the paralellogram) will be \begin{bmatrix}\frac{x_1+x_2}{2}-\frac{x_1+x_4}{2}&\frac{x_3+x_4}{2}-\frac{x_1+x_4}{2}\\\frac{y_1+y_2}{2}-\frac{y_1+y_4}{2}&\frac{y_3+y_4}{2}-\frac{y_1+y_4}{2}\end{bmatrix}.

The absolute value of the determinant of this matrix will be equal to the area of the paralellogram. It can be shown that this determinant can be written as $$ \frac {1}{4} \bullet \mathrm {det}\begin{bmatrix}x_1+x_2-x_1-x_4&x_3+x_4-x_1-x_4\\y_1+y_2-y_1-y_4&y_3+y_4-y_1-y_4\end{bmatrix} $$

Which can be rewritten $$ \frac {1}{4} \bullet \mathrm {det}\begin{bmatrix}x_2-x_4&x_3-x_1\\y_2-y_4&y_3-y_1\end{bmatrix} $$.

Since the area of the paralellogram is half that of the quadrilateral, the area of the quadrilateral can be given as

$$| \frac {1}{2} \bullet \mathrm {det}\begin{bmatrix}x_2-x_4&x_3-x_1\\y_2-y_4&y_3-y_1\end{bmatrix} |$$.

To me, this is a beautiful result.