I'm looking for a way to centre-align the centre column (\xrightarrows) in this construction.
\documentclass{article}
\usepackage{mathtools}
\begin{document}
\begin{alignat}[2]
\begin{bmatrix*}[r]
2 & 2 & \vline & 3 \\
1 & -3 & \vline & 2
\end{bmatrix*} & \xrightarrow{-R_2 \to R_1} && \begin{bmatrix*}[r]
1 & 5 & \vline & 1 \\
1 & -3 & \vline & 2
\end{bmatrix*} \\
\begin{bmatrix*}[r]
1 & 5 & \vline & 1 \\
1 & -3 & \vline & 2
\end{bmatrix*} & \xrightarrow{3 R_1} && \begin{bmatrix*}[r]
3 & 15 & \vline & \mathllap{-}1 \\
1 & -3 & \vline & 2
\end{bmatrix*}
\end{alignat}
\end{document}
Previous answers I've seen have used:
- an array environment to align columns (Centering equations within alignat command), but in this case the rows become too close together and can't be separated by adjusting the spacing of array rows because this also affects the matrix environments.
- an alignat environment (Centering column in alignat environment?) but this makes the centered column a text environment. I need a math environment.
\end{bmatrix*} & \xrightarrow{-R_2 \to R_1} && \begin{bmatrix*}[r]
acepptable to you\end{bmatrix*} & \xrightarrow{-R_2 \to R_1} \begin{bmatrix*}[r]
?