simple geometry question- equation of cylinder
The equation of an object is a way of telling whether a point is part of an object -- if you substitute the coordinates of the point into the equation and the equation is true, then the point is on the object; if the equation is not true for that point, then the point is not on the object. There is no $z$ because the z-coordinate is not part of the decision of whether a point is on the cylinder.
The fact that there is no z tells you that all points where the x- and y-coordinates satisfy the equation are part of the cylinder, regardless of the value of z. For example, if the equation is $(x-1)^2 + (y+2)^2 = 4$, then one of the points on the cylinder is (1,0,0), but so is (1,0,1) and (1,0,-1) and (1,0,5) and (1,0, -789) and so on. This means that the cylinder goes on forever both up and down.
If you really want an equation with z that support any cylinder position or rotation you can find it on another thread here :
$$(y−z)^2+(z−x)^2+(x−y)^2=3R^2$$
The link : Formula for cylinder
I searched it for while so I leave it here to help any other person searching for it !
Another way to think about this is the equations of the axes themselves. For instance, take the z-axis. All points on it have x=0 and y=0. Clearly it is a line with any z-allowed.
You could write the equation of the axis as $x^2+y^2=0$, because in the reals the only solution to this equation is $x=0$ and $y=0$.
This shows you that the z-axis is like an infinitely thin cylinder (with a point cross section / 0 radius). If you allowed a positive number $a^2$ on the right side, $x^2+y^2=a^2$ all you do is increase the radius / cross-sectional area. However, you still have an equation satisfied for any value of z, just like the z-axis itself.