# Zero of a function

In mathematics, a zero (also sometimes called a root) of a real-, complex-, or generally vector-valued function ${\displaystyle f}$, is a member ${\displaystyle x}$ of the domain of ${\displaystyle f}$ such that ${\displaystyle f(x)}$ vanishes at ${\displaystyle x}$; that is, the function ${\displaystyle f}$ attains the value of 0 at ${\displaystyle x}$, or equivalently, ${\displaystyle x}$ is the solution to the equation ${\displaystyle f(x)=0}$.[1] A "zero" of a function is thus an input value that produces an output of 0.[2]

A graph of the function ${\displaystyle \cos(x)}$ for ${\displaystyle x}$ in ${\displaystyle \left[-2\pi ,2\pi \right]}$, with zeros at ${\displaystyle -{\tfrac {3\pi }{2}},\;-{\tfrac {\pi }{2}},\;{\tfrac {\pi }{2}}}$, and ${\displaystyle {\tfrac {3\pi }{2}},}$ marked in red.

A root of a polynomial is a zero of the corresponding polynomial function.[1] The fundamental theorem of algebra shows that any non-zero polynomial has a number of roots at most equal to its degree, and that the number of roots and the degree are equal when one considers the complex roots (or more generally, the roots in an algebraically closed extension) counted with their multiplicities.[3] For example, the polynomial ${\displaystyle f}$ of degree two, defined by ${\displaystyle f(x)=x^{2}-5x+6}$ has the two roots (or zeros) that are 2 and 3.

${\displaystyle f(2)=2^{2}-5\times 2+6=0{\text{ and }}f(3)=3^{2}-5\times 3+6=0.}$

If the function maps real numbers to real numbers, then its zeros are the ${\displaystyle x}$-coordinates of the points where its graph meets the x-axis. An alternative name for such a point ${\displaystyle (x,0)}$ in this context is an ${\displaystyle x}$-intercept.