My answer only deals with the third matrix in your MWE, as it's the most challenging one to typeset in a visually appealing way. Like some of the other answers and comments have already noted, it's not necessary (as well as, I'd say, rather ugly) to make the column heights equal to the column widths. My answer below therefore adds only a small amount of whitespace between the rows (via the \extrarowheight
parameter). The column widths, however, are all forced to be the same. Furthermore, it would seem (at least for the case at hand) that it's preferable to left-align rather than to center the cells' contents.
\documentclass{article}
\usepackage{amsmath}
\usepackage[margin=1in]{geometry}
\newlength{\mycolwidth}
\settowidth{\mycolwidth}{$A_{n-1,-1}^{n-2}$} % widest entry
\usepackage{array}
\newcolumntype{Z}{>{$}p{\mycolwidth}<{$}}
\begin{document}
First, the plain (bmatrix) solution:
\begin{equation}
\begin{bmatrix}
A_{-n,0}^{-n} & A_{-n+1,-1}^{-n} & 0 & \cdots & \cdots & \cdots & \cdots & 0 \\
A_{-n,1}^{-n+1} & A_{-n+1,0}^{-n+1} & A_{-n+2,-1}^{-n+1} & \ddots & && & \vdots \\
0 & A_{-n+1,1}^{-n+2} & A_{-n+2,0}^{-n+2} & A_{-n+3,-1}^{-n+2} & \ddots & & & \vdots \\
\vdots & \ddots & \ddots & \ddots & \ddots & \ddots & & \vdots \\
\vdots & & \ddots & \ddots & \ddots & \ddots & \ddots& \vdots\\
\vdots & & & \ddots & A_{n-3,1}^{n-2} & A_{n-2,0}^{n-2} & A_{n-1,-1}^{n-2} & 0\\
\vdots & && & \ddots & A_{n-2,1}^{n-1} & A_{n-1,0}^{n-1} & A_{n,-1}^{n-1}\\
0 & \cdots & \cdots & \cdots & \cdots & 0 & A_{n-1,1}^{n} & A_{n,0}^{n} \\
\end{bmatrix}
\end{equation}
Second, a solution that forces all columnwidths to be the
same, left-aligns the cells' contents, and increases the
distances between rows:
\setlength{\extrarowheight}{1.5\baselineskip}
\begin{equation}
\left[ \begin{array}{*{8}{Z}}
A_{-n,0}^{-n} & A_{-n+1,-1}^{-n} & 0 & \cdots & \cdots & \cdots & \cdots & 0 \\
A_{-n,1}^{-n+1} & A_{-n+1,0}^{-n+1} & A_{-n+2,-1}^{-n+1} & \ddots & && & \vdots \\
0 & A_{-n+1,1}^{-n+2} & A_{-n+2,0}^{-n+2} & A_{-n+3,-1}^{-n+2} & \ddots & & & \vdots \\
\vdots & \ddots & \ddots & \ddots & \ddots & \ddots & & \vdots \\
\vdots & & \ddots & \ddots & \ddots & \ddots & \ddots& \vdots\\
\vdots & & & \ddots & A_{n-3,1}^{n-2} & A_{n-2,0}^{n-2} & A_{n-1,-1}^{n-2} & 0\\
\vdots & && & \ddots & A_{n-2,1}^{n-1} & A_{n-1,0}^{n-1} & A_{n,-1}^{n-1}\\
0 & \cdots & \cdots & \cdots & \cdots & 0 & A_{n-1,1}^{n} & A_{n,0}^{n} \\[5ex]
\end{array} \right]
\end{equation}
\end{document}
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\newcommand{\mymatrix}{
\left(\begin{gathered}
\tikzpicture[every node/.style={anchor=south west}]
\node[minimum width=2cm,minimum height=.6cm] at (0,0) {$C_2$};
\node[minimum width=2cm,minimum height=.6cm] at (0,.6) {$B_2$};
\node[minimum width=4cm,minimum height=1.2cm] at (2,0) {$M_{3,7}^{[1,2]}$};
\node[minimum width=1.5cm,minimum height=1.2cm] at (0,1.2) {$A_4$};
\node[minimum width=4.5cm,minimum height=1.2cm] at (1.5,1.2) {$M_{3,7}^{[1]}$};
\draw[dashed] (0,1.2) -- (6,1.2);
\draw[dashed] (0,0.6) -- (2,0.6);
\draw[dashed] (2,0) -- (2,1.2);
\draw[dashed] (1.5,1.2) -- (1.5,2.4);
\endtikzpicture
\end{gathered}\right)
}
\begin{document}
\[ M_{3,9} = \mymatrix \]
\end{document}
Best Answer
The following is not really eye-candy, but it's probably what you're after:
The use of
\vphantom
ensure that the row height for the "inner matrix" is similar across all rows (without actually printing\ddots
).I went with a more traditional approach (using
array
), rather thanpmatrix
. The advantage is that you have control over the alignment.