11

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!

Hagrid
  • 2,641

2 Answers2

3

I assume that you are familiar with affine subspaces and affine maps. Briefly, in case you are not: An affine map between vector spaces is a linear map plus a constant and affine spaces can always be thought of as vector spaces (move them to pass through the origin). The key observation is that each barycentric coordinate $h_i(P)$ depends affinely on $P$.

Let $T$ denote the plane containing the triangle $ABC$; it is an affine subspace of $\mathbb R^3$. You can extend the barycentric coordinates naturally to all of $T$, and they are affine functions $h_1,h_2,h_3:T\to\mathbb R$. (If you are outside the triangle, at least one of the barycentric coordinates is negative.)

An affine map from $T$ to any affine space is uniquely determined by its values at three points because $T$ is two dimensional. The sum of the barycentric coordinates is constant (as can be deduced from the fact that the sum is affine and the same at all corners of the triangle). Let this constant be $H$.

Now define $f:T\to\mathbb R^3$ by $$ f(P)=\frac1H(h_1(P),h_2(P),h_3(P)). $$ It is easy to see that $f$ is affine. Again, we check the values of this affine map at three points: $f(A)=A$, $f(B)=B$ and $f(C)=C$. Therefore $f$ has to be identity on all of $T$. This means that $$ (h_1(P)+h_2(P)+h_3(P))P=(h_1(P),h_2(P),h_3(P)) $$ for all $P\in T$. In particular, this holds for all $P$ in the triangle.

  • Could you explain to me a little more why the sum of barycentric coordinates is constant? I suppose it is because in a two dimensional space (in which the triangle lies) a point $P$ has barycentric coordinates $(a_1, a_, a_3)$ such that $(a_1 + a_2 + a_3)P = a_1P + a_2P + a_3P$, we has three points $a_1, a_2, a_3$, so there has to be an affine dependence between them, so there exist scalars $r_1 + r_2 + r_3=0$ such that $r_1 a_1 + r_2 a_2 + r_3 a_3 =0$. Does the statement about the constant sum somehow follow from this, or not necessarily? – Hagrid Mar 02 '15 at 15:54
  • 1
    @Hagrid, the sum of barycentric coordinates, $H(P)=h_1(P)+h_2(P)+h_3(P)$ is an affine function (as a sum of affine functions). Therefore it is uniquely determined by its values at three points (since it's defined on something with dimension two). Now $H(A)=H(B)=H(C)$, so $H$ is actually a constant. – Joonas Ilmavirta Mar 02 '15 at 15:57
  • I also do not see why $h_i: T \rightarrow \mathbb{R}$ or $h_i : \Delta \rightarrow \mathbb{R}$ is an affine map. $h_i : \Delta \ni (p_1, p_2, p_3) \rightarrow a_i \in \mathbb{R}$ and a map is affine if it is a sum: linear map + constant. Is the linear map =0 in this case? ($a_i$ are the same as in my first comment, to avoid confusion) – Hagrid Mar 02 '15 at 16:00
  • Just to make sure, is $H(A) =...=1$? – Hagrid Mar 02 '15 at 16:02
  • So we check how $f(P), H(P)$ behaves in three different points, we see that the values are equal in those three different points, and because $f, H$ are affine ($f$ is affine because $h_1, h_2, h_3$ are) , we see that $f, H$ are constant. Is that correct? – Hagrid Mar 02 '15 at 16:05
  • 1
    @Hagrid, $H(A)$ is the height of your triangle, which I believe is $\sqrt{3/2}$. A sum of affine maps is an affine map and the zero map is a linear map. An affine map is constant if and only if the corresponding linear map is the zero map. Within the triangle, each barycentric coordinate is the distance from a line, which is affine. (When extended to the whole plane, it becomes a signed distance.) – Joonas Ilmavirta Mar 02 '15 at 16:06
  • 1
    @Hagrid, for $H$ yes but for $f$ no. Any two affine maps that agree on three non-collinear points are equal. $H$ equals a constant map at such points so it is constant. $f$ equals the identity map (not the constant map!) at such points so it is identity. – Joonas Ilmavirta Mar 02 '15 at 16:08
  • Yes, you are right. I didn't reread my comment. But everything is absolutely clear to me now. Thank you! – Hagrid Mar 02 '15 at 16:09
  • @Hagrid, excellent! You are most welcome. – Joonas Ilmavirta Mar 02 '15 at 16:11
  • Could you also, if it isn't untactful, somehow comment on Han de Bruijn's answer, in which he says that the coordinates aren't the heights of the triangles but ratios of their areas to the area of the big triangle? – Hagrid Mar 02 '15 at 16:12
  • Aren't barycentric coordinates unique up to scaling? – Hagrid Mar 02 '15 at 16:13
  • Sorry for the confusion (caused by misunderstanding of the question): I've deleted the answer. – Han de Bruijn Mar 03 '15 at 09:49
  • I know it's silly of me to ask you this now, but how exactly do we know that $h_1(P), h_2(P), h_3(P)$ are the heights of the triangles inside $ABC$. What's more, barycenric coordinates of, say, $e_1=(1,0,0)$ are $h_1=1, h_2=0=h_3$, but they are unique up to scaling, do we can assume that $h_1= \frac{\sqrt{6}}{2}$ – Hagrid Mar 04 '15 at 16:07
  • So we can say that $H(P)= \frac{\sqrt{6}}{2}$ (the length of side of the simplex is $\sqrt{2}$). But why are $h_1(P), ...$ the heights of the small triangles? – Hagrid Mar 04 '15 at 16:10
  • 1
    @Hagrid, sorry for the delay. You defined the barycentric coordinates to be the heights of the heights of the small triangles. I took that as a definition and worked with that. That differs from the usual definition by a factor (as we have seen), but it looks like a reasonable definition to me. – Joonas Ilmavirta Mar 07 '15 at 04:56
  • @JoonasIlmavirta I see. Can't one modify this proof so that it proves that scalars which satisfy $(h_1+h_2+h_3)P=h_1p_1+h_2p_2+h_3p_3$ are heights of small triangles (up to scaling)? I'm sorry for the confusion. – Hagrid Mar 07 '15 at 06:59
  • I mean, given a triangle and a point inside, can we prove that $h_1, h_2, h_3$ satisfying the equation above are the respective heights? – Hagrid Mar 07 '15 at 10:30
  • 1
    @Hagrid, if your triangle is not equilateral, then the heights of triangles do not agree with barycentric coordinates up to scaling. It might be possible to show (with suitable assumptions) that $h$s satisfying the equation are a multiple of barycentric coordinates. That is an interesting question, but I think it should be asked as a separate question. – Joonas Ilmavirta Mar 07 '15 at 14:29
  • @JoonasIlmavirta What about equilateral triangle with vertices in $(1,0,0), (0,1,0), (0,0,1)$. How can we prove that statement in this case? – Hagrid Mar 07 '15 at 19:57
  • 1
    @Hagrid, the statement is not true without additional hypotheses even in that case. For any function $f$ from the triangle to the real line, let $\tilde h_i(P)=f(P)h_i(P)$ for each $i$. Then the functions $\tilde h$ also satisfy $(\tilde h_1+\tilde h_2+\tilde h_3)P=\tilde h_1 p_1+\tilde h_2 p_2+\tilde h_3 p_3$. I don't know what assumptions would be convenient. This is such a big question that it is better not to discuss it here in the comments. You can ask a new question (and maybe write me a comment here after you've asked it so I can take a look). – Joonas Ilmavirta Mar 07 '15 at 21:11
  • That would be great! Here it is: http://math.stackexchange.com/questions/1180022/barycentric-coordinates-in-a-2d-simplex – Hagrid Mar 07 '15 at 21:22
1

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.

  • So the barycentric coordinates are $(\frac{h_1}{H}, \frac{h_2}{H}, \frac{h_3}{H})$? – Hagrid Mar 02 '15 at 16:17
  • 1
    @Hagrid, yes, the usual barycentric coordinates are. Your definition seems to differ by a constant factor from the usual one, but it is still a reasonable definition. I commented this also under the other answer. – Joonas Ilmavirta Mar 02 '15 at 16:19
  • Great, thanks a lot! – Hagrid Mar 02 '15 at 16:22