For two vectors to be perpendicular, their dot product must be zero. The dot product of the given vectors is:
\[
(2\hat{i} + \hat{j} + \hat{k}) \cdot (\hat{i} - 4\hat{j} + \lambda \hat{k}) = 0
\]
Now, compute the dot product:
\[
(2\hat{i} \cdot \hat{i}) + (\hat{j} \cdot (-4\hat{j})) + (\hat{k} \cdot (\lambda \hat{k})) = 0
\]
Since \( \hat{i} \cdot \hat{i} = 1 \), \( \hat{j} \cdot \hat{j} = 1 \), and \( \hat{k} \cdot \hat{k} = 1 \), we get:
\[
2(1) + 1(-4) + \lambda(1) = 0
\]
Simplifying:
\[
2 - 4 + \lambda = 0 $\Rightarrow$ \lambda = 2
\]
Final Answer:
The value of \( \lambda \) is \( \boxed{2} \).