In mathematics, a quadric or quadric surface (quadric hypersurface if D > 2), is a generalization of conic sections (ellipses, parabolas, and hyperbolas) to any number of dimensions. It is any D-dimensional hypersurface in (D + 1)-dimensional space defined as the locus of zeros of a quadratic polynomial (D=1 in the case of conic sections). In coordinates x1, x2, ..., xD+1, the general quadric is 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 ring.
In general, the locus of zeros of a set of polynomials is known as an algebraic set, and is studied in the branch of algebraic geometry. A quadric is thus an example of an algebraic set. For the projective theory see Quadric (projective geometry).