1. ## A question about converting cylindrical coordinates to rectangular coordinates

I have a problem figuring something out when it comes to the formulas that are used to convert from cylindrical to 3D rectangular coordinates.

The formulas are as follows:

x = r cos theta
y = r sin theta
z = z

If theta is the angle between the X axis and r, we can use basic trigonometric functions to find X when we know the value of theta and r. But I don't understand why this applies to the Y axis too.
The way I understand it, the Y axis isn't even part of the triangle that contains the angle theta. Isn't the triangle that contains theta defined by the hypotenuse r and two sides, the X axis and a (imaginary) line between X and r ?