Look the graph in this video, left side shows the unit circle with radius r = 1. The center of the circle is the origin. OA is a ray whose one end point is the origin and other
endpoint is A. OA is the initial side of the angle that overlap with positive x-axis. If ray OA counterclockwise rotate to the B position, the ray OB is the terminal side of the angle AOB.
The terminal side of an angle can be in any quadrant. If ray OA counterclockwise rotate, the angle AOB is a positive angle. If ray OA clockwise rotate, the angle AOB is a negative
angle. The figure in right side shows a coordinate plane. The number in the x-axis represents the angle AOB rotated from its initial side to its end side. The number in y-axis
represents the value of y = tan x.

By the definition, tan x = sin x/cos x. So, if cos x = 0 (sin x is not zero), then tan x will be undefined. Because x = pi/2 or x = 3pi/2, cos x = 0. So, if x = pi/2 or x = 3pi/2, tan x will be undefined.

If sin x = 0 (cos x is not zero), then tan x = 0. Because x = 0, x = pi and x = 2pi, sin x = 0. So, if x= 0, x = pi and x = 2pi, tan x = 0.

If the angle AOB = pi/4, then x = y. By the definition, tan AOB = y/x. So, tan pi/4 = y/x = 1.

If the angle AOB = 3pi/4, then |x| = |y|, x < 0 and y > 0, By the definition, tan AOB = y/x. So, tan 3pi/4 = y/x = -1.

If the angle AOB = 5pi/4, then |x| = |y|, x < 0 and y < 0, By the definition, tan AOB = y/x. So, tan 5pi/4 = y/x = 1.

If the angle AOB = 7pi/4, then |x| = |y|, x > 0 and y < 0, By the definition, tan AOB = y/x. So, tan 7pi/4 = y/x = -1.

We can select more points in the interval of [pi/2, 3pi/2] and find the corresponding values of y = tan x, connect those points smoothly to get the graph of y = tan x.