# Compute area of triangle

## Problem

Triangle can be formed in between three points. These three points are in $$\mathbb{R}^3$$ and in my case these points are: $$p_1=(0,4,6),p_2=(-5,3,1),p_3=(2,1,2)$$. Compute area of this triangle.

## Attempt to solve

I take one point and draw two vectors $$\vec{u}$$ and $$\vec{v}$$ that define two sides of this triangle. Then i compute cross product of these two vectors which length gives me size of parallelogram. Dividing this parallelogram should give area of this triangle.

$$\vec{u}=\begin{bmatrix} 0-5 \\4+3 \\ 6+1 \end{bmatrix} = \begin{bmatrix} -5 \\ 7 \\ 7 \end{bmatrix}, \vec{v}=\begin{bmatrix} 0+2 \\ 4+1 \\ 6+2 \end{bmatrix}= \begin{bmatrix} 2\\ 5 \\ 8 \end{bmatrix}\$$

It shouldn't matter from which point i compute the other two vectors. Now length cross product vector should give us the area of parallelogram.

$$\vec{u} \times \vec{u} = \begin{vmatrix} i & j & k \\ -5 & 7 & 7 \\ 2 & 5 & 8 \end{vmatrix} = i\begin{vmatrix} 7 & 7 \\ 5 & 8 \end{vmatrix} - j \begin{vmatrix} -5 & 7 \\ 2 & 8 \end{vmatrix} + k\begin{vmatrix} -5 & 7 \\ 2 & 5 \end{vmatrix}$$

$$= i(7\cdot 8(7\cdot 5)- j(-5\cdot 8-7\cdot 2) + k(-5 \cdot 5 - 7 \cdot 2)$$

$$i(56-35)-j(40-14)+k(-25-14)$$

$$21i+54j-39k$$

$$\text{Area} = \frac{|\vec{u} \times \vec{v}|}{2} = \frac{\sqrt{21^2+52^2+(-39)^2}}{2} \approx 34.154$$

However this solution seems to be incorrect. WolframAlpha gives solution to this. Did i compute something simply wrong or is there more fundamental probelm on how i understand the problem ?

• Notice that $|u\times v|^2=|u|^2|v|^2-(u\cdot v)^2$, so there's no need to calculate the cross product explicitly. Dec 10 '18 at 20:00

You've defined $$\vec{u}=\vec{p}_1+\vec{p}_2,\,\vec{v}=\vec{p}_1+\vec{p}_3$$. You should have used $$-$$ instead of $$+$$ in each definition. For example, $$\vec{p}_1-\vec{p}_2$$ is the path from $$\vec{p}_2$$ to $$\vec{p}_1$$, forming a side.