def determinant(a, b, c, d, e, f, g, h, i):
    """Calculate the determinant of a three by three matrix.
    
    Where the matrix contents match the parameters, like so:
        |a b c|
        |d e f|
        |g h i|
    """
    return a*(e*i - f*h) - b*(d*i - f*g) + c*(d*h - e*g)