Area of triangle described as a determinant Let T be a triangle with vertices $P_1=(x_1,y_1), P_2=(x_2,y_2)$ and $P_3=(x_3,y_3)$. Show that the area of the triangle is equal to $\frac{1}{2}\det M$, where $$M= \begin{bmatrix}x_1&x_2&x_3\\y_1&y_2&y_3\\1&1&1\end{bmatrix}.$$
 A: Hint: $$\det M=\det\begin{bmatrix}x_1&x_2&x_3\\y_1&y_2&y_3\\1&1&1\end{bmatrix}=\det\begin{bmatrix}x_1-x_3&x_2-x_3&x_3\\y_1-y_3&y_2-y_3&y_3\\0&0&1\end{bmatrix}.$$
And try to decompose the vectors $\vec{P_3P_1}=(x_1-x_3,y_1-y_3),\vec{P_3P_2}=(x_2-x_3,y_2-y_3)$ along the $x,y$-axes direction.
A: First, notice you don't change the determinant by subtracting the first column from the two others. You have then
$$\det M= \left|\begin{array}{ccc}x_1&x_2-x_1&x_3-x_1\\y_1&y_2-y_1&y_3-y_1\\1&0&0\end{array}\right|$$
$$\det M= \left| \begin{array}{cc}x_2-x_1&x_3-x_1\\y_2-y_1&y_3-y_1\end{array}\right|$$
That is, the determinant of two vectors $\vec{P_1P_2}$ and $\vec{P_1P_3}$. To simplify notation, assume now that you compute the determinant and scalar product of two vectors $\vec{u}$ and $\vec{v}$, with coordinates respectively $(x,y)$ and $(x',y')$. And denote the norm of these vectors by simply $u$ and $v$.
The determinant is $xy'-x'y$, and the scalar product is $xx'+yy'$.
Now compute the sum of squares of these two numbers:
$$\left(xy'-x'y\right)^2+\left(xx'+yy'\right)^2=(x^2+y^2)(x'^2+y'^2)=u^2v^2$$
But the scalar product is also $uv \cos \theta$, where $\theta$ is the angle between $\vec{u}$ and $\vec{v}$.
Thus, $\det(\vec{u},\vec{v})^2 = u^2v^2-u^2v^2\cos^2 \theta = (uv \sin \theta)^2$, or :
$$|\det(\vec{u},\vec{v})| = |uv \sin \theta|$$
From trigonometry you know the area of a triangle $ABC$ is $S=\frac{1}{2}bc \sin A$ (see why here).
When you apply this to your determinant, you find that $\frac{1}{2}|\det(\vec{u},\vec{v})|$ is the area of the triangle formed by $\vec{u}$ and $\vec{v}$.
Now let $\vec{u}=\vec{P_1P_2}$ and $\vec{v}=\vec{P_1P_3}$, and you're done.
