Calculate 3D triangle area by determinant

7.2k Views Asked by At

It is well known that the area of the triangle (with vertices $a, b, c$) can be calculated as

$ \frac{1}{2}\det\left(\begin{bmatrix} a - c \\ b - c \end{bmatrix}\right) = \frac{1}{2}\det\left(\begin{bmatrix} a_x - c_x, a_y - c_y \\ b_x - c_x, b_y - c_y \end{bmatrix}\right)$

But what if I want to calculate the area of a triangle in 3 (or any higher) dimensions?

I tried to extend the matrix as $ \begin{bmatrix} a_x - c_x, a_y - c_y, a_z - c_z \\ b_x - c_x, b_y - c_y, b_z - c_z \\ 1, 1, 1 \end{bmatrix}$ and $ \begin{bmatrix} a_x - c_x, a_y - c_y, a_z - c_z \\ b_x - c_x, b_y - c_y, b_z - c_z \\ 0, 0, 1 \end{bmatrix}$ but I got incorrect results.

I'm not interested in solutions involving cross products.

2

There are 2 best solutions below

11
On BEST ANSWER

It is equal to $$ \frac12\sqrt{\det\left(\begin{bmatrix} a_x - c_x, a_y - c_y, a_z - c_z \\ b_x - c_x, b_y - c_y, b_z - c_z \end{bmatrix}\begin{bmatrix} a_x - c_x, a_y - c_y, a_z - c_z \\ b_x - c_x, b_y - c_y, b_z - c_z \end{bmatrix}^T\right)}, $$ where $T$ denotes transposition.

0
On

I use cross products, but I convert it in coordinates afterwards, with minimum computations (in particular, there is no need to use matrices):

$$\text{area}=\frac12 \|\vec{AB} \times \vec{AC}\|$$

Explanation: as $\vec{AB}$ and $\vec{AC}$ "live" in a 2D space, we have used here a 2D well known formula.

For a developed form with coordinates, if we set:

$$\begin{pmatrix}u_1\\u_2\\u_3\end{pmatrix}=\begin{pmatrix}x_B-x_A\\y_B-y_A\\z_B-z_A\end{pmatrix} \ \ \text{and} \ \ \begin{pmatrix}v_1\\v_2\\v_3\end{pmatrix}=\begin{pmatrix}x_C-x_A\\y_C-y_A\\z_C-z_A\end{pmatrix} $$

$$\text{area}=\frac12 \sqrt{(u_2v_3-u_3v_2)^2+(u_3v_1-u_1v_3)^2+(u_1v_2-u_2v_1)^2}$$