Area of an irregular polygon
The "shoelace" formula finds the area of a simple polygon:

from __future__ import division

def polygon_area(points):  
    """Return the area of the polygon whose vertices are given by the
    sequence points.

    """
    area = 0
    q = points[-1]
    for p in points:  
        area += p[0] * q[1] - p[1] * q[0]
        q = p
    return area / 2

if __name__ == '__main__':
    square = [(0,0), (0,1), (1,1), (1,0)]
    irregular = [(1,1), (1,5), (2,5), (5,1)]
    print('Unit square area: {}'.format(polygon_area(square)))
    print('Irregular polygon area: {}'.format(polygon_area(irregular)))


This outputs:

Unit square area: 1.0
Irregular polygon area: 10.0