## Cartesian coordinates vs. Barycentric Coordinates

### Introduction

The Greeks did not consider lengths of line segments and areas of figures as numbers in the way we understand them. They were quantities that could be compared as long as they were of the same kind. The ratio of two areas, for example might be equivalent to the ratio of two whole numbers, or not, as the case may be. For example, the ratio of the square on the hypotenuse of an isosceles right triangle to the area of the square on a side was known to be constant, and not equivalent an integral ratio. We now call this ratio the irrational number sqrt{2}.

Similarly, the area of a circle to the area of the square on its radius, was known to the Greeks to be constant. We now call this ratio the transcendental number pi

Not until the invention of algebra by al-Khowarizmi in 8th century Baghdad did it make sense to attempt to associate numbers with geometric quantities. It took another 800 years for Descartes and Fermat to achieve this revolution in geometry. It is based of the Cartesian coordinate system you learned about in high school analytical geometry.

Today, Descartes' great invention is best expressed in the form of vector geometry rather than in the form of the analytical geometry you learned in high school. It is based on the idea of combining both the length and the direction of a line segment. Vector geometry is built on top of an underlying Cartesian coordinate system, but in such a way that the exact location of the origin does not matter. Besides a huge notational advantage (less writing), the vector approach makes certain changes of coordinates much easier.

### Cartesian Coordinates

From high school, you learned an intuitive concept of a coordinate system in the plane as a way to assign a unique pair of numbers to every geometric point, given an origin, two perpendicular axes, and a unit marked on each axis.

Let’s make this more formal. Let E2 be the symbol for the Euclidean plane. E2 should be thought of as a set consisting of points, lines, and circles, etc., which obey Euclid’s axioms of geometry, but as perfected by 19th century mathematicians. Also, recall how the set of ordered pairs of real numbers, {(x,y)\ |\ x in RR, y in RR}, which is abbreviated by RR^2=RRxxRR, were used to encode the points in the Euclidean plane by means of a Cartesian coordinate system:

For example, for Euclid, a point, a line, distance and perpendicularity, are so-called "undefined" geometrical objects. Algebraically, an ordered pair of reals is a point, the set of points that satisfy a linear equations constitute a line, distance and angle are given by the Pythagorean and arctangent formulas you remember from high school.

We’ll write an = sign to mean this correspondence between geometrical points and pairs of numbers (e.g. P=(1,0)) when there is only one coordinate system around. When there are more, we can still avoid functional notation by decorating the equal signs to distinguish between them. You’ll see this method in use in the Question below. As you’ll discover, decorating symbols rather than giving them new names is a good way of avoiding verbose notation which makes math hard to read. Of course, when there is a question about the meaning we can always revert to the traditional notation.

Let’s next consider just what a change of coordinate system entails. Let f:E2rarr RR^2 and g:E2rarr RR^2 be two Cartesian coordinate systems. By a change of coordinates we mean the composition function  h = f diamond g^{-1}:RR^2 rarr RR^2 and its inverse is h^{-1}= g diamond f^{-1}:RR^2 rarr RR^2. This allows us to express a change of coordinates in terms of algebraic expressions which calculate how one pair of reals is transformed into another pair of reals. For example, the formula $(x,y) = (u \frac{\sqrt 3}{2} - v \frac{1}{2}, u \frac{1}{2} + v \frac{\sqrt 3}{2})$ rotates the plane about the origin by the angle $\frac{\pi}{6}$.

We note that

-The formula gives a unique output for each input because h is a function,

-No two different inputs have the same output ( it is injective),

-Every output is obtainable by a suitable input (it is surjective).

The next exercise gives a simple example of this idea.

Comment.

The change from Cartesian to polar coordinates you learned in calculus, $(x,y) = (r \cos \theta, r \sin \theta)$ is not a change of coordinates of the entire $(r,\theta\)$-plane because the entire axis $(0, \theta), \theta \in \mathbb{R}$ goes to the origin in the $(x,y)$-plane.

On the other hand, a rotation about the axis by any angle, $(x,y) = (u \cos \theta - v \sin \theta, u \sin \theta + v \cos \theta )$ is a valid change of coordinates.

Question.

Suppose we have one Cartesian coordinate system with perpendicular coordinate axes through the origin O=_1 (0,0). Let P=_1 (3,2). Consider the Cartesian coordinate system with origin P =_2 (0,0) and axes parallel to first, and preserving distance. For instance, O =_2(-3,-2). Suppose further that no point is fixed in the coordinate change. Write out the explicit formulas for the change of coordinate systems. (Can you find another solution with a fixed point. Hint: Consider a rotation about some point. Which one?)

Since lengths are preserved and the axes remain parallel, the change of coordinate systems is what we call a translation. We need to translate P to the origin.

Let X=_1(x,y) be a point and its coordinates in the first coordinate system. The change of coordinates formula is then

 (x,y)|->(x-3,y-2).

This means that if X=_2(xi,eta) then  xi =x-3 and eta =y-2. This transformation takes P=_1 (3,2) to P=_2(0,0). To go back, you just solve the two equations for  x, y  , so that

 (x,y)|->(x+3,y+2).

is the inverse transformation. Indeed, O=_1(-3,-2) =_2 (0,0) and P=_2(0,0)=_1(3,2) .

### Barycentric Coordinates

Barycentric coordinates are motivated by the problem of finding the center of gravity: in one dimension, if two weights are placed at points A and B on a line, where on the line does one place the fulcrum so that this "teeter-totter" balances? Similarly, in the plane, if three weights are placed at A, B, and C, where is the point in the plane where this weighted triangle balances on a pin?

Conversely, given △ABC, what weights must be put at the vertices to balance at some point P? The solution to this problem define a new coordinate system relative to the given positions A,B and C.

Comment.

Note that in the plane, barycentric coordinates are a triple of numbers, but with the restriction that their sum is always equal to one. As apprentice geometer, you should immediately ask whether it is really true that: Given $\triangle ABC$ does each point $P$ have a unique triplet solving the equation. There are many ways of seeing this, but given a Cartesian coordinate system in the plane we can answer the question directly, albeit in a nonintuitive, algebraic way. The following solution assumes that you are familiar with matrices.

Let $A = (a_1,a_2) \ , B = (b_1,b_2) \ , C = (c_1,c_2)$ be three given distinct and non-collinear points in the Cartesian plane and $P=(p_1,p_2)$ an arbitrary point. Then the 3 linear equations above can be written in one matrix equation

((a_1,b_1,c_1),(a_2,b_2,c_2),(1,1,1)) ((a),(b),(c)) = ((p_1), (p_2),(1)),

which has a unique solution because the determinant

|(a_1,b_1,c_1), (a_2,b_2,c_2), (1,1,1)|

is just twice the volume of the tetrahedron formed by the origin in 3-space and the three points lifted to the $z=1$ plane. This volume is zero if and only if the points are collinear.

Let A and B be disinct points. Here are some examples:

• The midpoint of segment AB is frac{A+B}{2}\ =\ frac{1}{2}A\ +\ frac{1}{2}B. So its barycentric coordinates are (frac{1}{2},frac{1}{2}).

 Click image to view in KSEG.
• In these coordinates, A=1A\ +\ 0B=(1,0) and point B=\ 0A\ +\ 1B=(0,1). Then let C=frac{2}{3}A\ +\ frac{1}{3}B=(frac{2}{3},frac{1}{3}).

 Click image to view in KSEG.

The next question is: what exactly do the barycentric coordinates (a,b) tell us about the location of C relative to A and B? Recall C=(a,b)=(frac{2}{3},frac{1}{3}). But according to the picture, C is closer to A than it is to B; in fact it is twice as far from B as it is to A. Let’s look at this more closely with another example.

## First Sample Calculation

 Click image to view in KSEG.

Given △ABC, find A':=(AP)(CB). From the picture, we resolve (A'BC)" to get "A'={::}_3^ul(1)B+{::}_3^ul(2)C.

What about (PA A')? Since A' is the midpoint of segment bar(AP), we have

 A'= \frac{A+P}{2} {::}_2^ul(1)P= A'-{::}_2^ul(1)A P= -A+2A'.

And so,

 P = (-1)A+2({::}_3^ul(1)B+{::}_3^ul(2)C) = (-1)A+{::}_3^ul(2)B+{::}_3^ul(4)C.
Question.

What if P=A?

Then P=(1,0,0)=A+0B+0C.

Question.

What if (AP) || (CB)?

Then the hypotheses $A' = (AP)(CB)$ is not satisfied. $A'$ would label a point where the two parallel lines intersect. In the Euclidean plane there is no such point. As we shall see later in the course, that in an extension of the Euclidean plane to the projective plane there is such a point. But the algebra has to be modified to continue to work properly.

Recall from the calculus that vectors can be added and multiplied by scalars to obtain new vectors. But the dot-product of two vectors is a number. Similarly, if two vectors are parallel, their ratio is also a number. For example, this ratio is $-1$ when the one vector is the negative of the other.

We now give a very useful result that we’ll need many times throughout the course.

Comment.

The last product $abx \ne0$ just says that none of the numbers is zero. You can check that the vector statements are equivalent by just doing some algebra, such as cross-multiplying the ratio equations, etc. It is more interesting to examine some special cases for the ratios. For example, if $a+b =0$ we should not be dividing by zero. But then $a/b = -1$ and therefore $A=B$, which is forbidden by the hypothesis $(ABX)$. Afterall, for $A=B$ every other point is "collinear" with this one point and nothing interesting is being said here. Let’s see if you can apply this reasoning yourself.

Question.

What happens to the ratios and the $a,b,x$ when $X$ just passes through $A$ or through $B$

One ratio becomes $0$ and the other ratio becomes $\infty$. So the ratios equal to $0,1,\infty$ are for special positions of the three points. Were all three points to coincide the ratios would have the indeterminate ratio $\frac{0}{0}$. Such peculiar arithmetic will prove to be useful in the projective plane when we discuss cross-ratios.

Here is a hint on how to prove this the MCL. First, suppose A\ne B and let \frac{X-A}{X-B} = -\frac{b}{a}. Then we can multiply through by a.

 \frac{X-A}{X-B} = -\frac{b}{a} a(X-A)=a(-\frac{b}{a}(X-B)) a(X-A)=-b(X-B) (a+b)X = aA+bB.
Question.

Why is a+b\ne 0?

If a+b=0, then \frac{X-A}{X-B}=1 hArr X-A=X-B hArr A=B, which is a contradiction since A\ne B.

Now dividing by (a+b), we get

 X=\frac{aA+bB}{a+b.

This shows that the second equation implies the first. By doing the arithmetic in the reverse ordeer you can see that the first equation also implies the second. Replacing $A \by B \and B \by A$ disposes of the third equation. See if you can show the fourth equation equivalent to one of the first three.

Question.

Yes, because logical equivalence is transitive. So is material implication. That is, if $\Sigma_1, \Sigma_2, \and \Sigma_3$ are three sentences for which $\Sigma_1 \Rightarrow \Sigma_2$ and $\Sigma_2 \Rightarrow \Sigma_3$ then $\Sigma_1 \Rightarrow \Sigma_3$

Thus, a more efficient, and hence more elegant proof would be to show that the first implies the second equation, the second implies the third, the third implies the fourth, and the fourth implies the first.

here is an interesting application of this theory.

Question.

How can you tell from the barycentric coordinates of a point $P$ relative to $\triangle ABC$ that $(PA) || (BC)$ ?

If $(PA) || (BC)$ then the displacent vectors $P-A \and B-C$ are proportional. In other words, there is a $t \in \mathbb{R}$ for which $P-A = t(B-C)$. We can rewrite this as $P = A + tB + (-t)C$ for which $t+(-t)=0$.
Conversely, suppose that for $P =aA +bB +cC \and a+b+c =1$ we also assume that $b+c=0$. Renaming $t=b=-c$ for symmetry, we now have that $a=1 \and P = A + t(B -C)$, from which follows that $P-A = t(B-C)$ and hence $(PA) || (BC)$.
In the next section we will apply this lesson to one of the most important results in this course due to Giovanni Ceva (1678) although it had been proven earlier by Yusuf Al-Mu’taman ibn Hud, king of Zaragosa in the 11th century. In analogy with the familiar word median for a line from a vertex of a triangle through the midpoint of the oposite side, we have the word cevian for any line through a vertex and the opposite side, for $\triangle ABC \and (\ell A) \and \not(\ell || (BC)$.