In mathematics, a quadric or quadric surface (quadric hypersurface in higher dimensions), is a generalization of conic sections (ellipses, parabolas, and hyperbolas). It is a hypersurface (of dimension D) in a (D + 1)-dimensional space, and it is defined as the zero set of an irreducible polynomial of degree two in D + 1 variables (D=1 in the case of conic sections). When the defining polynomial is not absolutely irreducible, the zero set is generally not considered a quadric, although it is often called a degenerate quadric or a reducible quadric.
In coordinates x1, x2, ..., xD+1, the general quadric is thus defined by the algebraic equation
which may be compactly written in vector and matrix notation as:
where x = (x1, x2, ..., xD+1) is a row vector, xT is the transpose of x (a column vector), Q is a (D + 1) × (D + 1) matrix and P is a (D + 1)-dimensional row vector and R a scalar constant. The values Q, P and R are often taken to be over real numbers or complex numbers, but a quadric may be defined over any field.
A quadric is an affine algebraic variety, or, if it is reducible, an affine algebraic set. Quadrics may also be defined in projective spaces; see § Projective geometry, below.