Answer :

To determine the value of [tex]\(\tan \left(\frac{\pi}{2}\right)\)[/tex], let's first recall the definition of the tangent function and properties of special angles.

The tangent function, [tex]\(\tan(\theta)\)[/tex], is defined as the ratio of the sine and cosine functions:
[tex]\[ \tan(\theta) = \frac{\sin(\theta)}{\cos(\theta)} \][/tex]

Now, let's plug in [tex]\(\theta = \frac{\pi}{2}\)[/tex]:

[tex]\[ \tan \left(\frac{\pi}{2}\right) = \frac{\sin \left( \frac{\pi}{2} \right)}{\cos \left( \frac{\pi}{2} \right)} \][/tex]

We need to know the sine and cosine of [tex]\(\frac{\pi}{2}\)[/tex]:

[tex]\[ \sin \left( \frac{\pi}{2} \right) = 1 \][/tex]

[tex]\[ \cos \left( \frac{\pi}{2} \right) = 0 \][/tex]

Substituting these values into the equation:

[tex]\[ \tan \left( \frac{\pi}{2} \right) = \frac{1}{0} \][/tex]

The division by zero is undefined in mathematics. Therefore, the value of [tex]\(\tan \left(\frac{\pi}{2}\right)\)[/tex] is:

[tex]\[ \boxed{\text{Undefined}} \][/tex]

Thus, the correct answer is:
[tex]\[ \text{B. Undefined} \][/tex]