I'm seeking to replicate this image:
Is there a way to get this without using any external packages other than tikz
(ideally just some combination of \array
and tabular
) or wild redefinitions? I prefer not using blkarray
because it does bad things when attempting to make it spit out a bracket matrix.
So far I can do
\documentclass[11pt]{amsart}
\begin{document}
\begin{tabular}{c @{\hspace{2\tabcolsep}} *{4}{c}}
&
0 &
1 &
2 &
3
\\[1ex]
0 & 0 & 1/3 & 1/3 & 1/3 \\
1 & 0 & 1/3 & 1/3 & 1/3 \\
2 & 1/3 & 1/3 & 1/3 & 0 \\
3 & 0 & 1/3 & 1/3 & 1/3 \\
\end{tabular}
\end{document}
Edit: I like the answer initially given by @Werner, but it seems hard to modify for, say, my use case. Here's what I tried, which fails to align the brackets correctly:
\[
P =
\begin{array}{ *{5}{c} }
\\[3\normalbaselineskip]
& \multicolumn{4}{c}{\rowind{State}} \\
& \colind{\$0} & \colind{\$1} & \colind{\$2} & \colind{\$3} \\
\rowind{0} & 0 & 1/3 & 1/3 & 1/3 \\
\rowind{1} & 0 & 1/3 & 1/3 & 1/3 \\
\rowind{2} \smash{\makebox[0pt][l]{$%
\hspace{.5\tabcolsep}\left[\begin{array}{@{}c@{}}
\mathstrut \\ \mathstrut \\ \mathstrut \\ \mathstrut
\end{array}\right.
$}} & 1/3 & 1/3 & 1/3 & 0 \smash{\makebox[0pt][l]{$%
\hspace{.5\tabcolsep}\left.\begin{array}{@{}c@{}}
\mathstrut \\ \mathstrut \\ \mathstrut \\ \mathstrut
\end{array}\right]
$}} \\
\rowind{3} & 0 & 1/3 & 1/3 & 1/3 \\
\end{array}
\]
\documentclass{...}
and ending with\end{document}
.tikz
? Using the matrix fromtikz
it should be possible i think.tikz
! I'm more averse to the odd things likekbordermatrix
.blkarray