Counting triangles in a grid

The question
A geoboard has its pegs in a rectangle 2 pegs across and 5 pegs down — 10 pegs altogether. A triangle is any three pegs joined by rubber bands.How many triangles can be made?Why

Count the triangles without drawing them

How it works.

across:2 down:5 pegs:10
1×10=10
10÷1=10
10×9=90
90÷2=45
45×8=360
360÷3=120
in a line:20
120−20=100
  1. 01

    Start from the pegs: 2 across and 5 down, 10 in all. A triangle is any three of them as corners.

  2. 02

    Choosing 3 of the 10 pegs is 10 choose 3, C(10,3) = 120.

  3. 03

    But three pegs in a straight line make no triangle. Here that is 20 down the columns — 20 straight-line triples in all.

  4. 04

    Take them off: 120 − 20 = 100. So 100 triangles, not the 120 you get by forgetting the straight lines.