no. of straight line, and triangle by joining points in a plane

Out of $18$ points in a plane, no three are in same straight line except $5$ points which are collinear.

Then the number of $(a)$ Straight lines $(b)$ Triangles which can be formed by joining them.

$\bf{My\; Solution::}$ $(a)$ For calculation of straight lines::

If there is no condition, then the number of straight line $=$ choosing $2$ points out of $18$ points $\displaystyle = \binom{18}{2}$

but given that $5$ points are collinear. So we can draw only one line by joining them.

But I did not understand why my answer is wrong.

For straight lines, your strategy is correct. There are $\binom{18}{2}$ ways to choose $2$ points. But any choice of $2$ points from the $5$ collinear ones, which can be done in $\binom{5}{2}$ ways, produces the same line. Thus the total number of lines is $\binom{18}{2}-\binom{5}{2}+1$.
For triangles, there are $\binom{18}{3}$ ways to choose $3$ points, but $\binom{5}{3}$ of the choices are forbidden.
• You are welcome. When I subtracted $\binom{5}{2}$, I took away all lines formed by taking two points from the five. But there is one line. – André Nicolas May 13 '14 at 5:10