[Tex/LaTex] Positive and Negative power in matrices and fixed size

horizontal alignmentmatrices

I'd like to create a matrix that has some positive power and negative power. I'd like to have an alignment to right, so for example:

\begin{array}{rr}
   3 \times 10^3 & 2 \times 10^3 \\
   3 \times 10^{-3} & 2 \times 10{-3}
\end{array}

In this case, the column alignment isn't good, because the negative sign at the exponent takes a little space, so the numbers aren't aligned. How can I fix this? (I think I should add a little space at the positive power too)

Then…is want to create 3 matrices in the page that should result aligned, indipendently from the values they have. For example if I write the previous matrix and then this:

  \begin{array}{rr}
      0 & 0 \\
      0 & 1 
  \end{array}

they won't be aligned because the second is smaller than the first. Is there a way to set a fixed size to both matrices?

Best Answer

\documentclass{article}
\usepackage{siunitx}
\begin{document}

\begin{tabular}{S[table-format=2e-1]S[table-format=2e-1]}
       3e3  &  2e3 \\
       3e-3 & 12e-3
\end{tabular}

\end{document}

alt text

Related Question