Linear algebra cylinder problem We have a plane. On that plane there is a line $p$:
$$p:x-1=2y-2=z+1$$
This plane also touches a cylinder with axis $x=y=z$. Find the equation of the plane and the diameter of the cylinder.
What I tried:
I solved for parameter $t$ from the line:
$$t = x-1 \implies x = t+1$$
$$t = 2y-2 \implies y = \frac{t+2}{2}$$
$$t = z+1\implies z = t-1$$
We also know that the point $T(1,1,-1)$ is on the line thus it also needs to be on the plane.
Then Ive put the parametrically defined coordinates of the line into the equation of the plane.
$$ax+by+cz = a(t+1)+b(\frac{t+2}{2})+z(t-1)$$
I do not know how to continue.
The solution is $x-z = 2$ which is the equation of the plane and the radius of the cylinder is $\sqrt{2}$
 A: The normal $(a,b,c)$ to the plane must   be orthogonal to the axis of the cylinder and to the given line $p$, so $a+b+c=0$ and $a+b/2+c=0$. This forces $b=0$ and $a=-c$ so $(1,0,-1)$ is a normal. Since $T=(1,1,-1)$ is on the plane, you deduce the equation of the plane is indeed $x-z=2$. The origin is on the axis of the cylinder, and the normal direction from the origin reaches the plane at $(1,0,-1)$, so the radius of the cylinder is $2^{1/2}$.
A: From your parametrization, (x,y,z) = (1,1,-1) + t(1, 1/2, 1).  Meanwhile the axis of the cylinder is (0,0,0) + s(1,1,1).  You want to find the point of closest approach between those two lines.  One way is to take the cross product of the direction vectors of the lines to get (-1/2, 0, 1/2).  The plane has to be perpendicular to that, so -1/2x + 1/2z = d, and using (1,1,-1) we find d = -1.  The formula for the distance from a point to a plane is $D = \frac {|ax_1 + by_1 + cz_1 + d|}{{(a^2 + b^2 + c^2)}^{1/2}} $ and you can use any point in the other plane, such as 0,0,0 because the cylinder axis goes through the origin.
