How many distinct isosceles triangles can you make with vertices on this square grid?
Note: Some of the triangles can be congruent, and they can overlap one another.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
To describe an isosceles triangle, start at the vertex where the two legs (sides of equal length) meet. These legs can be described as vectors ( x 1 , y 1 ) and ( x 2 , y 2 ) . Their length satisfies ℓ 2 = x 1 2 + y 1 2 = x 2 2 + y 2 2 ; the base (third leg) may be described as ( x 1 − x 2 , y 1 − y 2 ) and has length b 2 = ( x 1 − x 2 ) 2 + ( y 1 − y 2 ) 2 .
We will systematically consider the values of x 1 , x 2 , y 1 , y 2 that define an isosceles triangle and for each of them consider in how many locations they fit.
Possible complication #1 : In general, the equation x 1 2 + y 1 2 = x 2 2 + y 2 2 may have various non-trivial solutions, e.g. 3 2 + 4 2 = 5 2 + 0 2 or 8 2 + 1 2 = 7 2 + 4 2 . Fortunately, because we work on a small grid, we have ∣ x 1 ∣ , ∣ y 1 ∣ , ∣ x 2 ∣ , ∣ y 2 ∣ ≤ 4 , and this complication does not arise. This means that we only have trivial cases: { ∣ x 1 ∣ , ∣ y 1 ∣ } = { ∣ x 2 ∣ , ∣ y 2 ∣ } . Naturally, we rule out denegerate triangles where the legs have the same or opposite directions, where ( x 2 , y 2 ) = ± ( x 1 , y 1 ) .
Possible complication #2 : With this method, we risk counting equilateral triangles double, because any pair of sides could be viewed as the legs. However, an equilateral triangle must have at least one vertex with an irrational coordinate, so we don't have to worry.
The triangles may be generated in groups of four or eight by symmetry transformations, inverting the signs of x and/or y , and swapping the x and/or y coordinates. Realize also that swapping the legs ( x 1 , y 1 ) ↔ ( x 2 , y 2 ) does not yield a different triangle.
Each triangle fits in an orthogonal rectangle of width a = max { ∣ x 1 ∣ , ∣ x 2 ∣ , ∣ x 1 − x 2 ∣ } and height b = max { ∣ y 1 ∣ , ∣ y 2 ∣ , ∣ y 1 − y 2 ∣ } . The triangle fits in the grid iff the rectangle fits; there are ( 5 − a ) ( 5 − b ) possibilities. This number remains unchanged under the symmetry transformations.
With all this in place, consider the possibilities:
( x 1 , y 1 ) = ( 0 , p ) and ( x 2 , y 2 ) = ( p , 0 ) with 1 ≤ p ≤ 4 . Here, a = b = p . Through sign changes we obtain four versions of each. The number of triangles of this kind is 4 p = 1 ∑ 4 ( 5 − p ) ( 5 − p ) = 4 × ( 1 2 + 2 2 + 3 2 + 4 2 ) = 1 2 0 .
( x 1 , y 1 ) = ( p , q ) and ( x 2 , y 2 ) = ( − p , q ) with 1 ≤ p ≤ 2 and 1 ≤ q ≤ 4 . Now a = 2 p and b = p . Through changing the sign of q and exchanging x and y we obtain four versions of each. The number of triangles is 4 p = 1 ∑ 2 q = 1 ∑ 4 ( 5 − 2 p ) ( 5 − q ) = 4 × ( 3 + 1 ) × ( 4 + 3 + 2 + 1 ) = 1 6 0 .
( x 1 , y 1 ) = ( p , q ) and ( x 2 , y 2 ) = ( q , p ) with 1 ≤ q < p ≤ 4 . We have a = b = p . Through changing the signs of p , q we obtain four versions of each. 4 p = 2 ∑ 4 q = 1 ∑ p − 1 ( 5 − p ) 2 = 4 × ( 3 × 1 2 + 2 × 2 2 + 1 × 3 2 ) = 8 0 .
( x 1 , y 1 ) = ( p , q ) and ( x 2 , y 2 ) = ( − q , − p ) with 1 ≤ q < p ≤ 3 . We have a = b = p + q . Through changing the signs of p and exchanging x , y we obtain four versions of each. 4 a = 3 ∑ 4 p + q = a , q < p ∑ ( 5 − a ) 2 = 4 × ( 1 × 1 2 + 1 × 2 2 ) = 8 0 .
( x 1 , y 1 ) = ( p , q ) and ( x 2 , y 2 ) = ( q , − p ) with 1 ≤ q < p ≤ 4 . We have a = p and b = p + q . Through changing the signs of p , q and exchanging x , y we obtain eight versions of each. 8 b = 3 ∑ 4 p + q = b , q < p ∑ ( 5 − p ) ( 5 − b ) = 8 × ( 2 × 1 + 3 × 2 ) = 6 4 .
This adds up to a total of 4 4 4 triangles.