Solution (source code)

= Solution

Use <Gaussian elimination>. The last equation gives $y=c-z$, and the second then gives $x=b-4c-2z$. Substitute these into the first equation to obtain $3b-10c-z=a$. Back-substitution yields
$$
\boxed{x=2a-5b+16c,\qquad y=a-3b+11c,\qquad z=-a+3b-10c.}
$$
The <linear system> has <matrix> form
$$
\begin{pmatrix}3&2&7\\1&4&6\\0&1&1\end{pmatrix}\begin{pmatrix}x\\y\\z\end{pmatrix}=\begin{pmatrix}a\\b\\c\end{pmatrix}.
$$
The coefficients of the arbitrary right-hand side in the solved expressions are the rows of the <matrix inverse>. Therefore
$$
\boxed{\begin{pmatrix}3&2&7\\1&4&6\\0&1&1\end{pmatrix}^{-1}=\begin{pmatrix}2&-5&16\\1&-3&11\\-1&3&-10\end{pmatrix}.}
$$
Multiplying the original <matrix> by this candidate gives the <identity matrix>; its <determinant> is $-1$, so the solution is unique for every $(a,b,c)$.