For tables, tabularx does what I want to, but I haven't found a similar package that works in the math environment. mathtools allows for right-aligned matrices, but does not provide, afaik, an option for making columns equally wide.
I've provided a small example that looks best if the columns are both equally wide and right-aligned. Generally, I think many matrices are easier to read when the columns are equally wide. Of course, center-alignment is often ok, but not in all cases.
Code: Select all
\documentclass[a4paper]{article}
\usepackage{amsmath}
\usepackage{array}
\begin{document}
% Alternative 1: Make columns equally wide:
\newcolumntype{K}{>{$}p{0.3cm}<{$}}
% Alternative 2: Make columns right-aligned:
%\newcolumntype{K}{r}
{\footnotesize
\begin{align*}
D(e) &= \left(
\begin{array}{*{6}K}
1 & 0 & 0 & 0 & 0 & 0 \\
0 & 1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1
\end{array}
\right)
\qquad
D(C_{2x'}) = \left(
\begin{array}{*{6}K}
-1 & 0 & 0 & 0 & 0 & 0 \\
0 & -1 & 0 & 0 & 0 & 0 \\
0 & 0 & 1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & 1
\end{array}
\right) \\
D(C_{2y'}) &= \left(
\begin{array}{*{6}K}
0 & i & 0 & 0 & 0 & 0 \\
-i & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & -1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & -1
\end{array}
\right)
\qquad
D(C_{2z'}) = \left(
\begin{array}{*{6}K}
0 & -i & 0 & 0 & 0 & 0 \\
i & 0 & 0 & 0 & 0 & 0 \\
0 & 0 & -1 & 0 & 0 & 0 \\
0 & 0 & 0 & 1 & 0 & 0 \\
0 & 0 & 0 & 0 & 1 & 0 \\
0 & 0 & 0 & 0 & 0 & -1
\end{array}
\right)
\end{align*}
}
\end{document}