The solution with the
bmatrix* environment of
mathtools is not as good as I thought. Even with a slightly tweaked
array environment you get better results.
Code: Select all
\documentclass[11pt,a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{mathtools}
\usepackage{array}
\newcommand*{\pmm}{\phantom{\mathrel{-}}}
\newcolumntype{P}{>{\pmm}r}
\begin{document}
\begin{equation}
P_{321} =
\begin{bmatrix}
\pmm 1 & \pmm 0 & \pmm 0 \pmm \\
\pmm 0 & \pmm 1 & \pmm 0 \pmm \\
\pmm 0 & \pmm 0 & -1\pmm
\end{bmatrix}\!\!\!
\begin{bmatrix}
\pmm 0 & \pmm 0 & \pmm 1 \pmm \\
\pmm 0 & \pmm 1 & \pmm 0 \pmm \\
-1 & \pmm 0 & \pmm 0 \pmm
\end{bmatrix}
\end{equation}
\begin{equation}
P_{321} =
\begin{bmatrix*}[r]
1 & 0 & 0 \\
0 & \pmm 1 & 0 \\
0 & 0 & -1
\end{bmatrix*}\!\!\!
\begin{bmatrix*}[r]
0 & 0 & \pmm 1 \\
0 & \pmm 1 & 0 \\
-1 & 0 & 0
\end{bmatrix*}
\end{equation}
\begin{equation}
P_{321} =
\left[
\begin{array}{rPr}
1 & 0 & 0 \\
0 & 1 & 0 \\
0 & 0 & -1
\end{array}
\right]\!\!\!
\left[
\begin{array}{rPP}
0 & 0 & 1 \\
0 & 1 & 0 \\
-1 & 0 & 0
\end{array}
\right]
\end{equation}
\end{document}
But none of these solutions is really satisfactory. For example, with the
array environment you have to take care that you only use the new »P« column type in columns without a minus sign. But at least you don't have to insert the invisible minus sign explicitly. In the
bmatrix* environment at least one element in a column without any minus sign needs a
\pmm command to get the right appearance. And the distance between matrix elements and enclosing brackets seems too narrow. So these can only be partial solutions. But the method with array seems to be the simplest. The final choice is up to.