2.9. Write the decomposition of vector $\vec{a}$ in terms of vectors

$$
\vec{p}=\{1,2,4\} ; \vec{q}=\{1,-1,1\} ; \vec{r}=\{2,2,4\} ; \vec{a}=\{-1,-4,-2\} .
$$
Solution. According to (2.20), we need to find such numbers $\lambda, \mu, v$ that

$$
\ddot{a}=\lambda \cdot \vec{p}+\mu \cdot \vec{q}+v \cdot \vec{r}
$$

Substituting into this equality the expansions of vectors $\vec{a}, \vec{p}, \vec{q}, \vec{r}$ in terms of the basis $\vec{i}, \vec{j}, \vec{k}$, as given in the problem statement, we get

$$
-\vec{i}-4 \vec{j}-2 \vec{k}=\lambda \cdot(\vec{i}+2 \vec{j}+4 \vec{k})+\mu \cdot(\vec{i}-\vec{j}+\vec{k})+v \cdot(2 \vec{i}+2 \vec{j}+4 \vec{k})
$$

Using the properties of linear operations on vectors, given by their expansions in terms of the basis, we obtain from the last equality

$$
-\vec{i}-4 \vec{j}-2 \vec{k}=(\lambda+\mu+2 v) \vec{i}+(2 \lambda-\mu+2 v) \vec{j}+(4 \lambda+\mu+4 v) \vec{k}
$$

Since in the left and right parts of this equality, the expansions of the same vector $\overrightarrow{\boldsymbol{a}}$ in terms of the basis $\vec{i}, \vec{j}, \vec{k}$ are written, the following equalities must hold:

$$
\left\{\begin{array}{l}
\lambda+\mu+2 v=-1 \\
2 \lambda-\mu+2 v=-4 \\
4 \lambda+\mu+4 v=-2
\end{array}\right.
$$

We have obtained a system of linear equations for three unknown quantities $\lambda, \mu, v$. Solving this system, for example, by the Gaussian method (see Chapter 1), we will find the required quantities $\lambda$, $\mu, v$. We have:

$$
\left(\begin{array}{ccc|c}
1 & 1 & 2 & -1 \\
2 & -1 & 2 & -4 \\
4 & 1 & 4 & -2
\end{array}\right)+\left(\begin{array}{ccc|c}
1 & 1 & 2 & -1 \\
0 & -3 & -2 & -2 \\
0 & -3 & -4 & 2
\end{array}\right)+\left(\begin{array}{ccc|c}
1 & 1 & 2 & -1 \\
0 & -3 & -2 & -2 \\
0 & 0 & -2 & 4
\end{array}\right) .
$$

Here, on the first stage (marked with the number 1), in accordance with the Gaussian method, we multiplied the first row of the table (i.e., the first equation of the system) by -2 and added it to the second row (to the second equation of the system) element-wise: the first element of the first row, multiplied by -2, was added to the first element of the second row, the second element of the first row after being multiplied by -2 was added to the second element of the second row, and so on. The third row after the first transformation stage was obtained by multiplying the first row by -4 and adding it to the third row.

On the second stage, we added to the elements of the third row the elements of the second row, multiplied by -1. In the resulting table, the third row represents a shortened record of the third equation of the considered system, which, after the transformations we performed, has the form: $-2 v=4$, from which we get $v=-2$. Based on the appearance of the second row of the table, the second equation of the system now has the form $-3 \mu-2 v=-2$. Substituting the found value of $v$, we get $-3 \mu=-2+2 \cdot(-2)=6$, or $\mu=2$. Finally, substituting the found values of $v$ and $\mu$ into the first equation of the system $\lambda=-1-2 v-\mu$, we get $\lambda=-1+4-2=1$, i.e., $\lambda=1$.

Thus, the required expansion has the form

$$
\vec{a}=\vec{p}+2 \bar{q}-2 \vec{r}
$$