Is $\tan(\pi/2)$ undefined or infinity?

In algebraic sense, it is just an undefined quantity. You have no way to assign a value to $\tan (\pi/2)$ so that its value is compatible with usual algebraic rules together with the trigonometric identities. Thus we have to give up either the algebraic rules or the definedness of $\tan(\pi/2)$. In many cases, we just leave it undefined so that our familiar algebras remain survived.

But in other situation, where some geometric aspects of the tangent function have to be considered, we can put those rules aside and define the value of $\tan(\pi/2)$. For example, where we are motivated by the continuity of the tangent function on $(-\pi/2, \pi/2)$, we may let $\tan(\pm\pi/2) = \pm\infty$ so that it is extended to a 1-1 well-behaving mapping between $[-\pi/2, \pi/2]$ and the extended real line $[-\infty, \infty]$. In another example, anyone who is familiar with complex analysis will find that the tangent function is a holomorphic function from the complex plane $\Bbb{C}$ to the Riemann sphere $\hat{\Bbb{C}}=\Bbb{C}\cup\{\infty\}$ by letting $\tan(\frac{1}{2}+n)\pi = \infty$ the point at infinity.

In conclusion, there is no general rule for assigning a value to $\tan(\pi/2)$, and if needed, it depends on which property you are considering.


$\tan \frac{\pi}{2}$ is undefined, $$\lim \limits_{x \to \frac{\pi}{2}^{+}} \tan x = -\infty \quad \text{and} \quad \lim\limits_{x \to \frac{\pi}{2}^{-}} \tan x = +\infty~,$$ where the ${}+{}$ and ${}-{}$ in the limits indicate whether a point is approached from right or left side.

In different contexts infinity may or may not be considered undefined but in general a thing being undefined does not imply it is infinite. In this case, note that $f(x_0)$ is entirely unrelated to $\lim \limits_{x \rightarrow x_0} f(x)$, unless the function is continuous at $x_0$.


It depends on what you mean.

Is $\tan$ a real-valued (partial) function? Then $\tan(\pi/2)$ is undefiend.

Is $\tan$ an extended real-valued (partial) function? Then $\tan(\pi/2)$ is undefined.

Is $\tan$ a projective real-valued (partial) function? Then $\tan(\pi/2) = \infty$, and $\tan$ is actually a total function on the reals. (total meaning its domain is all of the reals)