Let L be the line with parametric equations

x = -1+3t
y = −5−t
z = −1

Find the shortest distance d from the point P0=(−5, −3, 5) to L, and the point Q on L that is closest to P0. Use the square root symbol '√' where needed to give an exact value for your answer.
d = _
Q = (_, _, _)

I know we have to deal with them in vectors. I think we should be making a vector that is LQ but otherwise idk what to do. If someone could help that would be great.

To find the shortest distance from a point to a line, we need to find a vector that connects the point to a point on the line, and then find the projection of this vector onto the direction vector of the line.

Let's start by finding the vector that connects the point P0=(-5, -3, 5) to a point Q on the line L. We can call this vector PQ.

PQ = (xQ - xP0, yQ - yP0, zQ - zP0)

Now, substituting the parametric equations of the line into the vector equation PQ, we have:

PQ = (xQ - (-5), yQ - (-3), zQ - 5)
= (xQ + 5, yQ + 3, zQ - 5)

Next, we find the direction vector of the line L. The direction vector is simply the coefficients of t in the parametric equations of x, y, and z.

Direction vector of L = (3, -1, 0)

Now, to find the shortest distance d, we need to find the projection of vector PQ onto the direction vector of the line. We can use dot product to achieve this.

Projection of PQ onto the direction vector of L = (PQ · Direction vector of L) / ||Direction vector of L||

Since the direction vector has magnitude of 1, the formula simplifies to:

Projection of PQ onto the direction vector of L = PQ · Direction vector of L

Expanding this dot product, we have:

PQ · Direction vector of L = (xQ + 5, yQ + 3, zQ - 5) · (3, -1, 0)
= 3(xQ + 5) - (yQ + 3)
= 3xQ + 15 - yQ - 3

Setting this equal to zero (since we want to find the projection), we have:

3xQ + 15 - yQ - 3 = 0

Simplifying the equation, we get:

3xQ - yQ = -12

Now, we need to find the value of t that satisfies both the equations of the line L and the equation we just obtained.

Substitute the equations x = -1 + 3t, y = -5 - t into the equation we obtained:

3(-1 + 3t) - (-5 - t) = -12

Simplifying this equation, we get:

-3 + 9t - (-5) - t = -12

-3 + 9t + 5 - t = -12

8t + 2 = -12

8t = -14

t = -14/8

t = -7/4

Now substitute this value of t back into the equations of L to find the corresponding values of x and y:

xQ = -1 + 3(-7/4)
= -1 - 21/4
= -25/4

yQ = -5 - (-7/4)
= -5 + 7/4
= -13/4

Finally, substitute the value of t = -7/4 into the equation of z to find the value of zQ:

zQ = -1

So, the point Q on the line L that is closest to the point P0 is:

Q = (-25/4, -13/4, -1)

To find the shortest distance d, we calculate the distance between P0 and Q using the distance formula:

d = √((xQ - xP0)^2 + (yQ - yP0)^2 + (zQ - zP0)^2)
= √((-25/4 - (-5))^2 + (-13/4 - (-3))^2 + (-1 - 5)^2)
= √((-25/4 + 20/4)^2 + (-13/4 + 12/4)^2 + (-6)^2)
= √(((-5/4)^2 + (-1/4)^2 + 36))
= √(25/16 + 1/16 + 36)
= √(62/16)
= √(31/8)
= √31/√8

Therefore, the shortest distance d from the point P0 to the line L is √31/√8, and the point Q on the line closest to P0 is (-25/4, -13/4, -1).