In mathematics, "diagonal" has different meanings. For example, in geometry a diagonal is any line that goes between the corners of a polygon. So a square has two diagonals, and a five-sided shape has five diagonals. In general the count of diagonal can be identified by a formula [n(n-3)]/2 where n is the total number of sides of shapes.