# How to draw the following table (simplex tableau)

I would like to draw table,

I tried,

$$\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}$$


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

-

$$\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}$$

It's a bit odd, in my opinion, to have the labels inside a matrix. I would advocate using a \kbordermatrix to label the columns as well as rows instead. – Ollie Ford Nov 18 '15 at 7:06