Area of triangle in coordinate geometry

Hello friends.

There is a formula for area of a triangle in coordinate geometry which is as follows.

$\displaystyle \frac{1}{2}|x_1(y_2 - y_3)+x_2 (y_3 - y_1)+x_3 (y_1 - y_2)| $

I do not understand some aspects of this formula.

1. mod sign

2. I know the proof for all points lying in the first quadrant. Is there a proof that the area won't change for points lying in other quadrants? I could check for all the possible sets but that will take too long.

Are these two related?

Thanks.

Re: Area of triangle in coordinate geometry

Quote:

Originally Posted by

**AaPa** I do not understand some aspects of this formula.

1. mod sign

The argument of the absolute value function is twice the *signed* area of the triangle. It is positive if (x1, y1), (x2, y2) and (x3, y3) are vertices listed in one direction (clockwise or counterclockwise, I don't remember) and negative if they are listed in the opposite direction.

Quote:

Originally Posted by

**AaPa** 2. I know the proof for all points lying in the first quadrant. Is there a proof that the area won't change for points lying in other quadrants? I could check for all the possible sets but that will take too long.

Which proof do you know?

One general way to derive this formula is to consider the signed area of the parallelogram built on vectors

$\displaystyle (x_2 - x_1)e_1 + (y_2 - y_1)e_2$ and $\displaystyle (x_3 - x_1)e_1 + (y_3 - y_1)e_2$ (*)

where $\displaystyle e_1$, $\displaystyle e_2$ are the vectors of an orthonormal positively oriented basis. The signed area function $\displaystyle \langle a,b\rangle$ takes two vectors $\displaystyle a$ and $\displaystyle b$ and returns a number. It has the following properties.

$\displaystyle \langle a,b\rangle=-\langle b,a\rangle$

$\displaystyle \langle a,b+c\rangle=\langle a,b\rangle+\langle a,c\rangle$

$\displaystyle \langle a,xb\rangle=x\langle a,b\rangle$ (i.e., the function is linear in both arguments)

$\displaystyle \langle a,a\rangle=0$

$\displaystyle \langle e_1,e_2\rangle=1$

If you expand (*) according to linearity, you should get the required formula.

For more, see the shoelace formula in Wikipedia.

Re: Area of triangle in coordinate geometry

In my proof we drop perpendiculars from each of the vertices on x axis. We get 3 trapeziums. The area of triangle is the difference in areas of (sum of 2 trapeziums with a common parallel side) and (the other trapezium). And most of what you said I was not able to understand. I don't know that much mathematics. Thanks for answering though.

Re: Area of triangle in coordinate geometry

In fact, it is easy to see that the value the formula returns does not change with parallel shifts. This is obvious for vertical shifts: if y₁, y₂ and y₃ are all increased or decreased by the same amount, then the differences between them do not change. Consider now a horizontal shift, i.e., replace x₁, x₂ and x₃ by x₁ + Δ, x₂ + Δ and x₃ + Δ, respectively. Then the value of the formula changes by (1/2)Δ((y₂ - y₃) + (y₃ - y₁) + (y₁ - y₂)) = 0.

So, it is enough to prove the formula for triangles in the first quadrant and then shift them to an arbitrary position.

Re: Area of triangle in coordinate geometry

Wow this is an elegant method. But how do we prove the formula for triangles whose points lie in different quadrants?

Re: Area of triangle in coordinate geometry

Hmm, a triangle with vertices in different quadrants can still be shifted so that all its vertices lie in the first quadrant, can it not? We don't have to use either horizontal or vertical shift; we can do both.

Re: Area of triangle in coordinate geometry

Quote:

Originally Posted by

**emakarov** It is positive if (x1, y1), (x2, y2) and (x3, y3) are vertices listed in one direction (clockwise or counterclockwise, I don't remember) and negative if they are listed in the opposite direction.

That would mean x2(y3-y1) + x3(y1-y2) and x3(y3-y1) + x2(y1-y2) should have opposite signs but I am not able to find such a relation between them save x2= - x3

Re: Area of triangle in coordinate geometry

Quote:

Originally Posted by

**AaPa** That would mean x2(y3-y1) + x3(y1-y2) and x3(y3-y1) + x2(y1-y2) should have opposite signs but I am not able to find such a relation between them.

I assume you are considering the case when x1 = 0. You give two expressions: x2(y3-y1) + x3(y1-y2) and x3(y3-y1) + x2(y1-y2). If the second expression is the result of traversing the triangle in the opposite direction, then the second expression should be obtained from the first one by exchanging indices 2 and 3. Indeed, the first expression results from listing vertices as (x1, y1), (x2, y2), (x3, y3), and the second expression results from listing vertices as (x1, y1), (x3, y3), (x2, y2). Therefore, the second expression should be

x3(y2 - y1) + x2(y1 - y3).

It is indeed the opposite of

x2(y3 - y1) + x3(y1 - y2).

Re: Area of triangle in coordinate geometry

i understood my mistake. thanks a lot.