In algebra, a quadratic function, a quadratic polynomial, a polynomial of degree 2, or simply a quadratic, is a polynomial function with one or more variables in which the highest-degree term is of the second degree.
For example, a univariate (single-variable) quadratic function has the form
f
(
x
)
=
a
x
2
+
b
x
+
c
,
a
≠
0
{\displaystyle f(x)=ax^{2}+bx+c,\quad a\neq 0}
in the single variable x. The graph of a univariate quadratic function is a parabola whose axis of symmetry is parallel to the y-axis, as shown at right.
If the quadratic function is set equal to zero, then the result is a quadratic equation. The solutions to the univariate equation are called the roots of the univariate function.
The bivariate case in terms of variables x and y has the form
f
(
x
,
y
)
=
a
x
2
+
b
y
2
+
c
x
y
+
d
x
+
e
y
+
f
{\displaystyle f(x,y)=ax^{2}+by^{2}+cxy+dx+ey+f\,\!}
with at least one of a, b, c not equal to zero, and an equation setting this function equal to zero gives rise to a conic section (a circle or other ellipse, a parabola, or a hyperbola).
A quadratic function in three variables x, y, and z contains exclusively terms x2, y2, z2, xy, xz, yz, x, y, z, and a constant:
f
(
x
,
y
,
z
)
=
a
x
2
+
b
y
2
+
c
z
2
+
d
x
y
+
e
x
z
+
f
y
z
+
g
x
+
h
y
+
i
z
+
j
,
{\displaystyle f(x,y,z)=ax^{2}+by^{2}+cz^{2}+dxy+exz+fyz+gx+hy+iz+j,}
with at least one of the coefficients a, b, c, d, e, or f of the second-degree terms being non-zero.
In general there can be an arbitrarily large number of variables, in which case the resulting surface of setting a quadratic function to zero is called a quadric, but the highest degree term must be of degree 2, such as x2, xy, yz, etc.