### Instruction: There exist vectors $\mathbf{a}$ and $\mathbf{b}$ such that
\[\mathbf{a} + \mathbf{b} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix},\]where $\mathbf{a}$ is parallel to $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix},$ and $\mathbf{b}$ is orthogonal to $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}.$  Find $\mathbf{b}.$.### Response: To find $\mathbf{b}$, I need to use the given information about $\mathbf{a}$ and $\mathbf{b}$ and how they relate to each other and to the vector $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}.$
Since $\mathbf{a}$ is parallel to $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix},$ that means $\mathbf{a}$ is a scalar multiple of that vector, say $\mathbf{a} = k \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix},$ for some constant $k.$
Since $\mathbf{b}$ is orthogonal to $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix},$ that means their dot product is zero, that is, $\mathbf{b} \cdot \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} = 0.$
Now I can use the equation $\mathbf{a} + \mathbf{b} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix}$ and substitute $\mathbf{a} = k \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}$ to get $k \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} + \mathbf{b} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix}.$
I can rewrite this equation as $\begin{pmatrix} k \\ 2k \\ -k \end{pmatrix} + \mathbf{b} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix}$ and then solve for $\mathbf{b}$ by subtracting $\begin{pmatrix} k \\ 2k \\ -k \end{pmatrix}$ from both sides, giving $\mathbf{b} = \begin{pmatrix} 2 \\ -1 \\ 3 \end{pmatrix} - \begin{pmatrix} k \\ 2k \\ -k \end{pmatrix} = \begin{pmatrix} 2 - k \\ -1 - 2k \\ 3 + k \end{pmatrix}.$
Now I have an expression for $\mathbf{b}$ in terms of $k$, but I still need to find the value of $k$ that satisfies the orthogonality condition $\mathbf{b} \cdot \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} = 0.$
To do that, I can take the dot product of both sides with $\begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix}$ and get $\begin{pmatrix} 2 - k \\ -1 - 2k \\ 3 + k \end{pmatrix} \cdot \begin{pmatrix} 1 \\ 2 \\ -1 \end{pmatrix} = 0.$
Expanding the dot product, I get $(2 - k) \cdot 1 + (-1 - 2k) \cdot 2 + (3 + k) \cdot (-1) = 0.$
Simplifying, I get $2 - k - 2 - 4k - 3 - k = 0,$ or $-6k - 3 = 0.$
Solving for $k$, I get $k = -\frac{1}{2}.$