Quadratic relations and functions