(i) Number of lines formed any two points out of given N points = nC2 and number of lines formed by joining any two points out of p collinear points = pC2. But these collinear points giving exactly one straight line passing through all of them.
Hence required number of straight lines = nC2− nC2+1
(ii) Number of triangles formed by joining any three points out of given n points = nC3 and number of triangles formed by joining any three points out of p collinear points = pC3. But no triangle would be formed by joining any three points out of these p collinear points.
Hence the number of triangles formed = nC3− pC3