To solve the problem of finding the coordinates of the foot of the perpendicular and the length of the perpendicular drawn from the point \( P(5, 4, 2) \) to the line given by the vector equation \( \vec{r} = -\hat{i} + 3\hat{j} + \hat{k} + \lambda(2\hat{i} + 3\hat{j} - \hat{k}) \), we will follow these steps:
### Step 1: Identify the line's direction vector and point
The line can be expressed in parametric form. The point on the line when \( \lambda = 0 \) is:
\[
A = (-1, 3, 1)
\]
The direction vector of the line is:
\[
\vec{d} = (2, 3, -1)
\]
### Step 2: Write the coordinates of point \( Q \) on the line
Using the parameter \( \lambda \), the coordinates of any point \( Q \) on the line can be expressed as:
\[
Q(\lambda) = (-1 + 2\lambda, 3 + 3\lambda, 1 - \lambda)
\]
### Step 3: Find the vector \( \vec{PQ} \)
The vector \( \vec{PQ} \) from point \( P(5, 4, 2) \) to point \( Q(\lambda) \) is given by:
\[
\vec{PQ} = Q(\lambda) - P = (-1 + 2\lambda - 5, 3 + 3\lambda - 4, 1 - \lambda - 2)
\]
This simplifies to:
\[
\vec{PQ} = (2\lambda - 6, 3\lambda - 1, -\lambda - 1)
\]
### Step 4: Set up the perpendicularity condition
Since \( \vec{PQ} \) is perpendicular to the direction vector \( \vec{d} \), we can use the dot product:
\[
\vec{PQ} \cdot \vec{d} = 0
\]
Calculating the dot product:
\[
(2\lambda - 6, 3\lambda - 1, -\lambda - 1) \cdot (2, 3, -1) = 0
\]
This expands to:
\[
(2\lambda - 6) \cdot 2 + (3\lambda - 1) \cdot 3 + (-\lambda - 1)(-1) = 0
\]
Simplifying this gives:
\[
4\lambda - 12 + 9\lambda - 3 + \lambda + 1 = 0
\]
Combining like terms:
\[
14\lambda - 14 = 0
\]
Thus:
\[
\lambda = 1
\]
### Step 5: Find the coordinates of point \( Q \)
Substituting \( \lambda = 1 \) back into the equation for \( Q \):
\[
Q(1) = (-1 + 2 \cdot 1, 3 + 3 \cdot 1, 1 - 1) = (1, 6, 0)
\]
### Step 6: Calculate the length of the perpendicular
The length of the perpendicular from point \( P(5, 4, 2) \) to point \( Q(1, 6, 0) \) is given by the distance formula:
\[
d = \sqrt{(5 - 1)^2 + (4 - 6)^2 + (2 - 0)^2}
\]
Calculating this gives:
\[
d = \sqrt{(4)^2 + (-2)^2 + (2)^2} = \sqrt{16 + 4 + 4} = \sqrt{24} = 2\sqrt{6}
\]
### Final Answer
The coordinates of the foot of the perpendicular \( Q \) are \( (1, 6, 0) \) and the length of the perpendicular is \( 2\sqrt{6} \).
---