Alineación de elementos de matriz en Tikz

Alineación de elementos de matriz en Tikz

Estoy intentando alinear los elementos de la matriz hacia la izquierda pero no funciona. ¿Alguna idea?

\documentclass{beamer}
\usepackage{xcolor}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\usepackage{tikz}
\usetikzlibrary{matrix}  


\begin{document}



\begin{frame}{xxxxx}
\underline{\textbf{Example}}
\begin{itemize}
\item[$\rightarrow$] Let's consider two systems of linear equations that correspond to the same coefficient matrix $\mathbf{A}$
\end{itemize}




\begin{tikzpicture}[>=stealth,thick,baseline]
   \tikzstyle{column 8}=[myblue]
    \matrix [matrix of math nodes,column/.style={anchor=base west},ampersand replacement=\&](A){ 
    3 x_1  \&+ 5x_2    \& -4x_3   \& = \&7\\
    - 3 x_1 \& -2x_2  \& +4x_3   \& = \&  -1\\
      6  x_1 \& +x_2   \& -8x_3    \& =\&   -4\\
   };
   \end{tikzpicture}


\end{frame}

\end{document}

Respuesta1

¿Está obligado a utilizarlo tikzpara escribir su sistema de ecuaciones (como matriz)? Si no, puedes usar simple array:

\documentclass[table]{beamer}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}

\begin{document}
\begin{frame}{xxxxx}
\underline{\textbf{Example}}
\begin{itemize}
\item[$\rightarrow$] Let's consider two systems of linear equations that correspond to the same coefficient matrix $\mathbf{A}$
\end{itemize}

\[\setlength\arraycolsep{1pt}
\begin{array}{rrr >{\color{myblue}}r}
  3 x_1 + & 5x_2 - & 4x_3 = &   7\\
- 3 x_1 - & 2x_2 + & 4x_3 = &  -1\\
  6 x_1 + &  x_2 - & 8x_3 = &  -4\\
\end{array}
\]
\end{frame}
\end{document}

ingrese la descripción de la imagen aquí

Respuesta2

Para alinear a la izquierda los elementos de la matriz, puede establecer el estilo de cada celda mediante cells={anchor=west}onodes={anchor=west}

\documentclass{beamer}
\usepackage{xcolor}
\definecolor{lava}{rgb}{0.81, 0.06, 0.13}
\definecolor{myblue}{rgb}{0.0, 0.30, 0.60}
\usepackage{tikz}
\usetikzlibrary{matrix}  


\begin{document}



\begin{frame}{xxxxx}
\underline{\textbf{Example}}
\begin{itemize}
    \item[$\rightarrow$] Let's consider two systems of linear equations that correspond to the same coefficient matrix $\mathbf{A}$
\end{itemize}



\centering
\begin{tikzpicture}[>=stealth,thick,baseline]
    \tikzstyle{column 8}=[myblue]
    \matrix [matrix of math nodes,ampersand replacement=\&,cells={anchor=west}](A){ 
        3 x_1  \&+ 5x_2    \& -4x_3   \& = \&7\\
        - 3 x_1 \& -2x_2  \& +4x_3   \& = \&  -1\\
          6  x_1 \& +x_2   \& -8x_3    \& =\&   -4\\
    };
\end{tikzpicture}


\end{frame}

\end{document}

ingrese la descripción de la imagen aquí

información relacionada