To solve the system of linear equations using a matrix, we can 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 then use numpy's linear algebra solver to find the solution.
We start by representing the given system of linear equations 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.
\[
A = \begin{bmatrix}
-1 & -7 & -1 \\
4 & 4 & 4 \\
2 & 1 & 6
\end{bmatrix}, \quad
X = \begin{bmatrix}
x \\
y \\
z
\end{bmatrix}, \quad
B = \begin{bmatrix}
-19 \\
4 \\
7
\end{bmatrix}
\]
To find the solution \(X\), we solve the matrix equation \(AX = B\). The solution is given by:
\[
X = A^{-1}B
\]
After performing the matrix operations, we find the solution for \(X\):
\[
X = \begin{bmatrix}
-4.000 \\
3.000 \\
2.000
\end{bmatrix}
\]