Answer
The function $\cos x$ must be restricted in order to have an inverse.
Work Step by Step
The function $f(x)=\cos x$ is not an one-to-one function over its whole domain, therefore in order for the function to have an inverse we must restrict the domain so that the function is one-to-one.
For example the domain of $f$ might be $[0,\pi]$. The restriction of $f(x)$ has the domain and range:
$D_f=[0,\pi]$
$R_f=[0,1]$
The inverse $f^{-1}(x)=\cos^{-1} x$ has the domain and range:
$D_{f^{-1}}=[0,1]$
$R_{f^{-1}}=[0,\pi]$
Therefore $\cos^{-1} x\in [0,\pi]$.