5

I would like to draw table,

correct table

I tried,

\begin{equation}
\begin{array}{c}
z \\ 
s_1 \\
s_2 \\
s_3 
\end{array}
\begin{bmatrix}
\begin{array}{c|ccccc|c}
  z & x_1 & x_2 & s_1 & s_2 & s_3 & b \\ \hline
  1 & 0 & 0 & 1.6 & 2.2 & 0 & 544 \\ \hline
  0 & 1 & 1 & 0.4 & -0.2 & 0 & 16  \\
  0 & 0 & 1 & -0.2 & 0.6 & 0 & 72 \\
  0 & 0 & 0 & -0.4 & 0.2 & 1 & 19 \\
\end{array}
\end{bmatrix}
\end{equation}

However I get, with an allignment issue on the left,

incorrect

David Carlisle
  • 757,742
entropy
  • 473

1 Answers1

3

As soon as I posted the question i realized by adding another item in the first array I could move it down,

\begin{equation}
\begin{array}{c}
\\
z \\ 
s_1 \\
s_2 \\
s_3 
\end{array}
\begin{bmatrix}
\begin{array}{c|ccccc|c}
  z & x_1 & x_2 & s_1 & s_2 & s_3 & b \\ \hline
  1 & 0 & 0 & 1.6 & 2.2 & 0 & 544 \\ \hline
  0 & 1 & 1 & 0.4 & -0.2 & 0 & 16  \\
  0 & 0 & 1 & -0.2 & 0.6 & 0 & 72 \\
  0 & 0 & 0 & -0.4 & 0.2 & 1 & 19 \\
\end{array}
\end{bmatrix}
\end{equation}

Is this the best method however?

David Carlisle
  • 757,742
entropy
  • 473