For a triangle to occur, you cannot join the adjacent points from a fixed point. Thus, the maximum amount of triangles you can make in an n-sided shape is (n - 2). Since we're slicing down the polygon into triangles, we can find that the three angles have to add up to 180°.
Thus, the general formula becomes: 180(n - 2), where n is the number of sides of the polygon.
Let's verify this with a square/rectangle. They have 4 sides, so the summation of the interior angles become: 180(4 - 2) = 360, which is indeed correct.
The formula for finding the sum of the interior angles<span> of a </span>polygon<span> is the same, whether the </span>polygon<span> is regular or irregular. So you would use the </span>formula<span> (n-2) x 180, where n is the number of sides in the</span>polygon<span>. If you draw a diagonal in the square, that forms two triangles.</span>