I am trying to get my equation to look like the following:
I cannot seem to get anywhere close (is there a way to get labels in \bordermatrix
to go at the bottom?). Here is my code so far (without the dotted line and column totals)
\begin{eqnarray}
P^{\ast}_{t+1} &=& P_{t+1} + D_{t,t+1} - B_{t,t+1} \\ \nonumber
&=&
\left(
\begin{array}{llll}
1110 & 110 & 10 & 10 \\
45 & 440 & 45 & 0 \\
70 & 75 & 770 & 70 \\
35 & 30 & 30 & 330 \\
\end{array}
\right) +
\left(
\begin{array}{llll}
44.05 & 3.36 & 0.53 & 0.24 \\
1.79 & 13.44 & 2.37 & 0.00 \\
2.78 & 2.29 & 40.53 & 1.71 \\
1.39 & 0.92 & 1.58 & 8.05 \\
\end{array}
\right) -
\left(
\begin{array}{llll}
80 & 0 & 0 & 0 \\
0 & 25 & 0 & 0 \\
0 & 0 & 40 & 0 \\
0 & 0 & 0 & 40 \\
\end{array}
\right)
\end{eqnarray}
Best Answer
Here is one way of obtained the desired output:
I modified the alignment to be
r
ight for the four columns. With some more work, it would be possible to obtain a centred sum.The totals are added on a per-column basis using
\addsum
where you specify the information contained in the last and "sum" row. Thearydshln
package provides the dashed rule. Alternatively, using\hline
within\addsum
instead of\hdashline
yields the following output:In both instances,
\smash
removes all vertical height/depth of its contents. As such, be careful when adding contents below this expression. Adding a blank row in the form\\&
would mostly suffice.