I am having trouble centering the elements of a matrix such that the negative sign is not taken into account during alignment. Additionally, I would also like the space between the left parenthesis and the left edge of the leftmost column to equal to space between the right parenthesis and the right edge of the rightmost column. How would I typeset a matrix such that these visual constraints are satisfied?
Here is a link to a document that describes the problem. The source follows below:
\documentclass[11pt,a4paper]{article}
\usepackage{amsmath}
\usepackage{mathtools}
\begin{document}
\noindent This document provides some examples of matrices for which I cannot
get the elements to line up as I would like.
\bigskip
\noindent\textbf{Example.} I would like the numbers in the matrix $A$ to be
centered, but I do not want the negative sign to cause numbers to be shifted. In
other words, I am looking for something along the lines of a ``center, but
ignore the negative sign'' environment. For example, consider the matrix
\[
A = \begin{pmatrix*}
-1 & -10 & 1 \\
100 & 5 & 16 \\
13 & 7 & 7
\end{pmatrix*}.
\]
One common suggestion I have read advises to instead use the array environment,
along with the right-align option. However, there are still problems. Consider
the matrices
\[
A = \left(\begin{array}{rrr}
-1 & -2 & -3 \\
4 & 5 & 6 \\
-7 & -8 & -9
\end{array}\right), \quad\text{and}\quad
B = \left(\begin{array}{rrr}
-1 & -10 & 1 \\
100 & 5 & 16 \\
13 & 7 & 7
\end{array}\right).
\]
Since the elements of $A$ are all single digits, the alignment is satisfactory. Using the right-alignment hack does not do much good for
matrix $B$, where the elements have different digit lengths.
\bigskip
\noindent How can I center the elements of a matrix so that the negative sign
does not have any influence on alignment, and so that the space between the left
parenthesis and left edge the leftmost column of numbers equals the space
between the right parenthesis and the right edge of the rightmost column of
numbers?
\end{document}
Thanks for your help!