Find the matrix $\mathbf{P}$ such that for any vector $\mathbf{v},$ $\mathbf{P} \mathbf{v}$ is the projection of $\mathbf{v}$ onto the vector $\begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix}.$
Let $\mathbf{v} = \begin{pmatrix} x \\ y \\ z \end{pmatrix}.$  Then the projection of $\mathbf{v}$ onto $\begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix}$ is given by
\begin{align*}
\frac{\begin{pmatrix} x \\ y \\ z \end{pmatrix} \cdot \begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix}}{\begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix} \cdot \begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix}} \begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix} &= \frac{2x - 2y - z}{9} \begin{pmatrix} 2 \\ -2 \\ -1 \end{pmatrix} \\
&= \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{4}{9} x - \frac{4}{9} y - \frac{2}{9} z \\ -\frac{4}{9} x + \frac{4}{9} y + \frac{2}{9} z \\ -\frac{2}{9} x + \frac{2}{9} y + \frac{1}{9} z \end{pmatrix} \renewcommand{\arraystretch}{1} \\
&= \renewcommand{\arraystretch}{1.5} \begin{pmatrix} \frac{4}{9} & -\frac{4}{9} & -\frac{2}{9} \\ -\frac{4}{9} & \frac{4}{9} & \frac{2}{9} \\ -\frac{2}{9} & \frac{2}{9} & \frac{1}{9} \end{pmatrix} \renewcommand{\arraystretch}{1} \begin{pmatrix} x \\ y \\ z \end{pmatrix}.
\end{align*}Thus,
\[\mathbf{P} = \boxed{\begin{pmatrix} \frac{4}{9} & -\frac{4}{9} & -\frac{2}{9} \\ -\frac{4}{9} & \frac{4}{9} & \frac{2}{9} \\ -\frac{2}{9} & \frac{2}{9} & \frac{1}{9} \end{pmatrix}}.\]