[Tex/LaTex] Aligning three columns of equations

align

I am trying to create a list like below, enter image description here

but I can't seem to to align the three columns of equations and when I do I get something like

enter image description here

Here is my code:

$\begin{array}{ccc}
x_8 = 93 \quad y_8 = 64 \quad z_8 = 61\\
x_7 = 186 \quad y_7 = 32 \quad z_7 = 61\\
x_6 = 231 \quad y_6 = 32 \quad z_6 = 29
\end{array}$

Added image:

enter image description here

How would I align the two tables like that?

Best Answer

Here are 3 solutions. The second solution uses the matrix* environment from mathtools. It allows for an optional argument l,c or l. The default is c. The last solution relies on alignat, and gives an easy control on the spacing of the columns:

\documentclass{article}
\usepackage{mathtools}

\begin{document}
\[ \begin{array}{lll}%
x_8 = 93  &  y_8 = 64  &  z_8 = 61\\
x_7 = 186  &  y_7 = 32 &  z_7 = 61\\
x_6 = 231  &  y_6 = 32  &  z_6 = 29
\end{array}\]%

\[ \begin{matrix*}[l]%
x_8 = 93  &  y_8 = 64  &  z_8 = 61\\
x_7 = 186  &  y_7 = 32 &  z_7 = 61\\
x_6 = 231  &  y_6 = 32  &  z_6 = 29
\end{matrix*}\]%

\begin{alignat*}{3}
x_8  & = 93  &\qquad  y_8 &  = 64  &\qquad  z_8  & = 61\\
x_7  & = 186  &  y_7 & = 32 &  z_7  & = 61\\
x_6  & = 231  &  y_6  & = 32  &  z_6  & = 29
\end{alignat*}

\end{document} 

enter image description here

Related Question