def transform_point(point, matrix):
    """Transform point by matrix.

    :param list point: 2-item list
    :param list matrix: 6-item list representing transformation matrix
    :returns list: 2-item transformed point
    """
    x, y = point
    a, b, c, d, e, f = matrix
    # This leaves out some unnecessary stuff from the fact that the matrix is
    # homogenous coordinates.
    new_x = x * a + y * c + e
    new_y = x * b + y * d + f
    return [new_x, new_y]