A diagonal is a straight segment joining two corners of a polygon that are not next to each other. A polygon with n sides has (n(n-3))/2 diagonals, and Pythagoras gives their lengths.