# Area of a triangle by determinant (linear algebra) [duplicate]

A triangle has corners at $(0,0), (3,4)$, and $(2,-1)$. Compute its area using a determinant.

I'm not sure how to set up the matrix to use a determinant to find the area. Thanks for any help!!

• If your notes don't cover that this time, try read this: math.stackexchange.com/questions/299352/… – Li Chun Min Apr 28 '17 at 16:47
• – Lakshya Gupta Apr 28 '17 at 16:54
• The proposed duplicate is a bit fancy for this triangle, which has a corner at the origin and thus is easily assigned an area with a $2\times 2$ determinant. – hardmath Apr 28 '17 at 20:23

Suppose a triangle has three corners: $(x_1,y_1),\ (x_2,y_2),\ (x_3,y_3)$.
Then area of that triangle is defined by: $$\Delta =\dfrac{1}{2} \begin{vmatrix} x_1 & y_1 & 1 \\ x_2 & y_2 & 1\\ x_3 & y_3 & 1 \end{vmatrix} \text{ sq. unit}$$
You would find the distance between the points $(3,4)$ and $(2,-1)$, then the distance from the origin of the line through these two points (base and height).
Do it in abstract. The line through $(x_1,y_1)$ and $(x_2,y_2)$ has equation $$(y_1-y_2)(x-x_2)-(x_1-x_2)(y-y_2)=0$$ that can be rewritten as $$x(y_1-y_2)-y(x_1-x_2)+(x_1y_2-x_2y_1)=0$$ so the distance from it to the origin is $$h=\frac{|0(y_1-y_2)-0(x_1-x_2)+(x_1y_2-x_2y_1)|} {\sqrt{(y_1-y_2)^2+(x_1-x_2)^2\,}}$$ and the base is $$b=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}$$ Therefore the area is $$A=\frac{1}{2}bh= \frac{1}{2}|x_1y_2-x_2y_1|= \frac{1}{2}\left|\det\begin{bmatrix}x_1&x_2\\y_1&y_2\end{bmatrix}\right|$$ In your case $$A=\frac{1}{2}\left|\det\begin{bmatrix}3&2\\4&-1\end{bmatrix}\right|$$
Are you aware that the image of the unit square $[0,1]\times[0,1]$ under a linear transformation with matrix $M$ has area $|\text{det}(M)|$? So if we take half the square - i.e., the triangle with vertices $(0,0)$, $(1,0)$, and $(0,1)$ - the image of that under the same linear transformation has area $\frac{1}{2}|\text{det}(M)|$.
You want your triangle to be the image of the triangle described above under some linear transformation. Of course that transformation must send $(0,0)$ to $(0,0)$. You also want it to send $(1,0)$ and $(0,1)$ to the other two vertices of the triangle. Now all you have to do is write down the matrix for such a linear transformation.