The sine and cosine functions have a domain of all numbers from negative infinity to positive infinity.
The tangent function, however, is sine(theta) / cosine(theta). Cosine(theta) has value of zero at theta equal to pi / 2, 3pi/2, 5pi/2, ... in the positive direction, and -pi/2, -3pi/2, -5pi/2, ... As a result, tangent(theta) is undefined at these values, so the domain of tangent is all numbers from negative infinity to positive infinity except all numbers n pi/2 where n is odd.