To solve the given system of linear equations, we can use matrix operations. We will represent the system in matrix form \(AX = B\), where \(A\) is the coefficient matrix, \(X\) is the column matrix of variables, and \(B\) is the column matrix of constants. We can then use NumPy's linear algebra solver to find the values of \(X\).
Dado el sistema de ecuaciones lineales:
\[
\begin{array}{l}
3x + y + z = 1 \\
x + 2y - z = 1 \\
x + y + 2z = -17
\end{array}
\]
podemos representarlo en forma matricial como \(AX = B\), donde:
\[
A = \begin{bmatrix}
3 & 1 & 1 \\
1 & 2 & -1 \\
1 & 1 & 2
\end{bmatrix}, \quad
X = \begin{bmatrix}
x \\
y \\
z
\end{bmatrix}, \quad
B = \begin{bmatrix}
1 \\
1 \\
-17
\end{bmatrix}
\]
Al resolver el sistema, encontramos los valores de las variables:
\[
X = \begin{bmatrix}
5 \\
-6 \\
-8
\end{bmatrix}
\]
Esto implica que:
\[
x = 5, \quad y = -6, \quad z = -8
\]
Para verificar, sustituimos los valores de \(x\), \(y\) y \(z\) en las ecuaciones originales:
- \(3(5) + (-6) + (-8) = 15 - 6 - 8 = 1\) (verdadero)
- \(5 + 2(-6) - (-8) = 5 - 12 + 8 = 1\) (verdadero)
- \(5 + (-6) + 2(-8) = 5 - 6 - 16 = -17\) (verdadero)
Los valores de las variables son:
\[
\boxed{x = 5}, \quad \boxed{y = -6}, \quad \boxed{z = -8}
\]