def det3(u, v, w):
    """Determinant of 3x3 matrix formed by input 3-vectors ``u``, ``v`` and ``w``."""
    return u[0] * (v[1] * w[2] - v[2] * w[1]) + u[1] * (v[2] * w[0] - v[0] * w[2]) + u[2] * (v[0] * w[1] - v[1] * w[0])