Post subject: Triangles! And coordinates! Oh boy!
Joined: 11/26/2005
Posts: 285
I came up with a math problem a few days ago: is it possible to draw an equilateral triangle in a coordinate system so that each corner of the triangle is placed on an integer coordinate? Please try to help me solve this, it's driving me mad.
nesrocks
He/Him
Player (241)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
It sure is, but maybe what you would like to know is what is the smallest triangle side for that?
Skilled player (1405)
Joined: 10/27/2004
Posts: 1977
Location: Making an escape
It's easy if you use a right triangle.
A hundred years from now, they will gaze upon my work and marvel at my skills but never know my name. And that will be good enough for me.
Joined: 11/26/2005
Posts: 285
FODA wrote:
It sure is, but maybe what you would like to know is what is the smallest triangle side for that?
I haven't got any evidence for any solutions, so please post an example of one of these triangles.
Active player (283)
Joined: 3/4/2006
Posts: 341
By Pick's theorem, the area of any polygon whose vertices have integer coordinates must be half an integer. The area of an equilateral triangle is s^2 * sqrt(3)/4, which is irrational (since s^2 is an integer). Hence, it is impossible to have an equilateral triangle in R^2 with integer coordinates.
Tub
Joined: 6/25/2005
Posts: 1377
Since translations don't change anything, we can define point A to be at (0, 0). Now, for any given point B at (bx, by), there is a formula that determines the position of point C - just rotate B clockwise by 60°.
[cx, cy] = [ cos(60)  -sin(60)
             sin(60)   cos(60) ] * [bx, by] = [ bx*cos(60) - by*sin(60) , bx*sin(60) + by*cos(60) ]

cx = bx*cos(60) - by*sin(60)
cy = bx*sin(60) + by*cos(60)
Now can you fill in (bx, by) as integers in a way that (cx, cy) are integers, too? your turn. edit: aww, nitrodon is no fun.
m00
Skilled player (1402)
Joined: 5/31/2004
Posts: 1821
Nitrodon wrote:
The area of an equilateral triangle is s^2 * sqrt(3)/4
Should be sqrt(3/4), but yeah... you are right. It's impossible.
BigBoct
He/Him
Editor, Former player
Joined: 8/9/2007
Posts: 1692
Location: Tiffin/Republic, OH
Ferret Warlord wrote:
It's easy if you use a right triangle.
He was asking about equilateral triangles, and a right triangle cannot be an equilateral triangle.
Previous Name: boct1584
Joined: 11/26/2005
Posts: 285
Nitrodon wrote:
By Pick's theorem, the area of any polygon whose vertices have integer coordinates must be half an integer. The area of an equilateral triangle is s^2 * sqrt(3)/4, which is irrational (since s^2 is an integer). Hence, it is impossible to have an equilateral triangle in R^2 with integer coordinates.
Thank you! I'm glad to be able to think about something else now.
Skilled player (1405)
Joined: 10/27/2004
Posts: 1977
Location: Making an escape
Solon wrote:
Ferret Warlord wrote:
It's easy if you use a right triangle.
He was asking about equilateral triangles, and a right triangle cannot be an equilateral triangle.
... Crap. Thought he was talking isosceles for some reason.
A hundred years from now, they will gaze upon my work and marvel at my skills but never know my name. And that will be good enough for me.
nesrocks
He/Him
Player (241)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Beats me that it can be proven to be impossible! Crazy.
Editor, Skilled player (1941)
Joined: 6/15/2005
Posts: 3247
I already asked the same question a long time ago in math challenges. http://tasvideos.org/forum/viewtopic.php?p=157239#157239
Active player (354)
Joined: 1/16/2008
Posts: 358
Location: The Netherlands
heh nice problem and nice solution nitro :)
TASes: [URL=http://tasvideos.org/Movies-298up-Obs.html]Mr. Nutz (SNES), Young Merlin 100% (SNES), Animaniacs 100% (SNES)[/URL]
Tub
Joined: 6/25/2005
Posts: 1377
actually, if you allow a triangle with edge lengths of 0, it is possible ;)
m00
Joined: 7/2/2007
Posts: 3960
You mean...a line? :p
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
nesrocks
He/Him
Player (241)
Joined: 5/1/2004
Posts: 4096
Location: Rio, Brazil
Derakon wrote:
You mean...a line? :p
It would be a point.
Tub
Joined: 6/25/2005
Posts: 1377
no, it would be three vertices (all three at the same location) all three connected by straight lines. If you ask the next guy to define a triangle, he'd say "three points connected by lines", that simple definition is fulfilled. Since all edges have the same length, it's an equilateral triangle. It violates some other properties usually assumed of triangles (angles aren't defined, the points are collinear, ...), but as it is in mathematics, you can define your objects as you need them. If three vertices and three same-length edges are all you need, it's possible. Otherwise, it's not.
m00
Joined: 11/1/2007
Posts: 100
Tub wrote:
...angles aren't defined...
Actually, since it's equilateral, the angles are assumed to be 60 degrees each.
Tub
Joined: 6/25/2005
Posts: 1377
no, the fact that equilateral triangles have 60° angles is a property that's only valid/provable for triangles with nonzero area. The angle is defined as sin(a) = a/h or rad = s/r or something, which isn't defined when all significant lengths are zero. Division by zero is bad, hmkay?
m00
arflech
He/Him
Joined: 5/3/2008
Posts: 1120
Baxter wrote:
Nitrodon wrote:
The area of an equilateral triangle is s^2 * sqrt(3)/4
Should be sqrt(3/4), but yeah... you are right. It's impossible.
no, it actually is sqrt(3)/4 the height of an equilateral triangle of base s is s*sqrt(3)/2, so the area is (1/2)s*s*sqrt(3)/2=s^2*sqrt(3)/4 One way to think about this issue is to remember the Cartesian and coordinate-free formulas for the dot product of vectors: u.v=u1v1+u2v2=|u||v|cos(q), where u=(u1,u2), v=(v1,v2), and q is the angle between them. If q=60 degrees, then cos(q)=1/2, and |u|=|v|=sqrt(u1^2+u2^2), so the equation on the right simplifies to u1v1+u2v2=(u1^2+u2^2)/2. Now let u1=n, u2=m, v1=p, and v2=q be integers, with 0<m<n and with n and m, and p and q, relatively prime; then it can first be noted that both n and m must be odd, because they cannot both be even (else they would not be relatively prime), and if only one were even then (n^2+m^2)/2 would not be an integer even though (n^2+m^2)/2=np+mq, which is an integer. Also, because n^2+m^2=p^2+q^2 (because |u|=|v|), the same holds for p and q. To break the symmetry I will attempt to eliminate p between these two equations and then show that q cannot be an integer. From the first equation, p=(n^2+m^2-2mq)/(2n), so p^2=(n^4+m^4+4m^2*q^2+2n^2*m^2-4mqn^2-4qm^3)/(4n^2), and substitution into that second equation yields n^2+m^2=(n^4+m^4+4m^2*q^2+2n^2*m^2-4mqn^2-4qm^3+4n^2*q^2)/(4n^2) which simplifies to 4n^4+4n^2*m^2=n^4+m^4+4m^2*q^2+2n^2*m^2-4mqn^2-4qm^3+4n^2*q^2 from which 4(n^2+m^2)q^2-4m(n^2+m^2)q-(3n^4+2n^2*m^2-m^4)=0 which has a discriminant (with respect to q) of 16m^2(n^2+m^2)^2+16(n^2+m^2)(3n^4+2n^2*m^2-m^4) which simplifies to 3*16n^2(n^2+m^2)^2, with square root 4n(n^2+m^2)sqrt(3), so there is no way for q, which in the end turns out to be (n±m*sqrt(3))/2, to be an integer after all, a contradiction. Pick's Theorem is more elegant though.
i imgur com/QiCaaH8 png
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
I think that this is a beautiful practical demonstration of the difference between rational and irrational numbers, something which might otherwise feel like a rather abstract distinction. (Now, if someone could come up with an equally beautiful example of the difference between algebraic and transcendental numbers...)
Skilled player (1402)
Joined: 5/31/2004
Posts: 1821
Arflech wrote:
no, it actually is...
It was 3 am when I wrote that... I realized I was wrong the next morning...
Joined: 11/1/2007
Posts: 100
Tub wrote:
no, the fact that equilateral triangles have 60° angles is a property that's only valid/provable for triangles with nonzero area. The angle is defined as sin(a) = a/h or rad = s/r or something, which isn't defined when all significant lengths are zero. Division by zero is bad, hmkay?
Then it's not an equilateral triangle as you erroneously pointed out.
HHS
Active player (282)
Joined: 10/8/2006
Posts: 356
An equilateral triangle is defined by all sides being equal in length. So it's an equilateral triangle.
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
HHS wrote:
An equilateral triangle is defined by all sides being equal in length. So it's an equilateral triangle.
I think that the mathematical definition of a triangle contains the requirement that the three points must not be collinear. The three points being at the same place makes them collinear.