How tangent is defined
Tangent is the ratio of sine to cosine: tan(θ) = sin(θ) / cos(θ). In a right triangle, it equals the opposite side divided by the adjacent side.
Tangent is undefined wherever cosine equals zero — at 90°, 270°, and all angles of the form (2k+1) × 90°. At these points, the function approaches positive or negative infinity.