Barycentric coordinates in a triangle - proof I want to prove that the barycentric coordinates of a point $P$ inside the triangle with vertices in $(1,0,0), (0,1,0), (0,0,1)$ are distances from $P$ to the sides of the triangle.
Let's denote the triangle by $ABC, \ A = (1,0,0), B=(0,1,0), C= (0,0,1)$.
We consider triangles $ABP, \ BCP, \ CAP$.
The barycentric coordinates of $P$ will then be $(h_1, h_2, h_3)$ where $h_1$ is the height of $ABP$, $h_2 \rightarrow BCP$, $h_3 \rightarrow CAP$
I know that $h_1 = \frac{S_{ABP}}{S_{ABC}}$ and similarly for $h_2, \ h_3$
My problem is that I don't know how to prove that if $P= (p_1, p_2, p_3)$
then $(h_1 + h_2 + h_3)P = h_1 (1,0,0) + h_2 (0,1,0) + h_3 (0,0,1)$
Could you tell me what to do about it?
Thank you!

Let $A_i$ $\>(1\leq i\leq3)$ be the vertices of your triangle $\triangle$, and let $P=(p_1,p_2,p_3)$ be an arbitrary point of $\triangle$. Then the  cartesian coordinates $p_i$ of $P$ satisfy $p_1+p_2+p_3=1$, and at the same time we can write
$$P=p_1A_1+p_2A_2+p_3A_3\ ,$$
which says that the $p_i$ can be viewed as well as barycentric corrdinates of $P$ with respect to $\triangle$.
We now draw the normal $n_3$  from $P$ to the side $A_1A_2$ of $\triangle$. This normal will be orthogonal to $\overrightarrow{A_1A_2}=(-1,1,0)$ and to $s:=(1,1,1)$; the latter because $n_3$ lies in the plane of $\triangle$. It follows that $\overrightarrow{A_1A_2}\times s=(1,1,-2)$ has the proper direction. We now have to intersect
$$n_3:\quad t\mapsto (p_1,p_2,p_3) +t(1,1,-2)$$
with the plane $x_3=0$ and obtain $t={p_3\over2}$. Therefore the distance from $P$ to $A_1A_2$ is given by
$$h_3={p_3\over2}\sqrt{1+1+4}=\sqrt{3\over2}\>p_3\ .$$ The conclusion is that the barycentric coordinates of $P$ are not equal to the three heights in question, but only proportional to these.
