Can area be irrational?
If $ABC$ is an equilateral triangle and $A=(0,0),B=(x,y)$, then $C$ lies in: $$ C=\left(\frac{x\mp \sqrt{3}y}{2},\frac{y\pm \sqrt{3}x}{2}\right),$$ so assuming that $B$ is a point with rational coordinates, $C$ is not.
Moreover, the area of an equilateral triangle is just $\frac{\sqrt{3}}{4}l^2$ where $l$ is the length of a side.
In the same way, if the side length is a rational number, the area is not.
With an alternative approach, if all the three vertices of an equilateral triangle have rational coordinates then the area is a rational number by the shoelace formula. But in such a case the squared length of the side is also a rational number, hence the area is at the same time a rational number and $\sqrt{3}$ times a rational number, contradiction.
Your counterexample doesn't work, because $x+y=2$ doesn't imply that $x$ and $y$ are rational. In fact, we have also that $x^2+y^2=8$. By substituting $y=2-x$ into the latter equation, you will get a quadratic equation with two irrational roots.
You should re-read the book's proof...
Briefly,
- Assume that the third point has rational co-ordinates
- Then by the formula you cite, the area is rational
- But the area is an irrational number times the length of a side squared
- But by the original assumptions, two vertices have rational coordinates, so the side length squared is also rational
- A rational times an irrational is irrational; therefore in this case, the area is irrational
- Thus the assumption (Point 1) leads to a contradiction (Point 2 vs Point 5)
It's Points 4 and 5 that the book fails to state explicitly...
Confronting the actual question asked by you, instead of that asked by your book:
Area in general CAN be irrational. The Area of that particular triangle cannot.
According to your question:
It says that lets assume the coordinates of 3rd vertex to be rational so when we use the area of a triangle formula if 3 vertices are given we get a rational area. But we know area of equilateral triangle is 3 √ 4 side 2 so the area is irrational that's not possible so one coordinate has to be irrational.
This quote mentions that a triangle with 3 rational vertices will have a rational area.
If it has a rational area, then it cannot also have an irrational area.
Thus, a triangle with 3 rational vertices cannot have an irrational area.
(Returning to your book's given answer, it argues that an equilateral triangle with two rational vertices must have an irrational area, therefore the third vertex cannot be completely rational since that could not produce an irrational area.)