# \hfill in math mode for multiple alignments

I would like to reproduce something like the screenshot attached here, with two separate equations in each line, each set of equations aligned amongst themselves.

On my end, LaTeX always pushes everything left of the second alignment symbol to the farthest left it can be, as if it is all part of the first equation, while I would like the left hand side of the second equation in the same line be immediately next to its own equal sign.

Specifically for the case attached here, I would like to align the two equations respectively with $\to$ and $=$ separately.

Also, if possible, ideally I would like to implement this with just the align environment.

Minimum not-working code:

\documentclass[11pt, oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
\begin{align}
\left(\begin{array}{c}{\psi_{L}} \\ {\chi_{L}}\end{array}\right) &\rightarrow\left(\begin{array}{cc}{\cos \varphi_{\psi_{L}}} & {-\sin \varphi_{\psi_{L}}} \\ {\sin \varphi_{\psi_{L}}} & {\cos \varphi_{\psi_{L}}}\end{array}\right)\left(\begin{array}{c}{\psi_{L}} \\ {\chi_{L}}\end{array}\right), \hfill \tan \varphi_{\psi_{L}}&=\frac{\Delta}{m}\\
\left(\begin{array}{c}{\tilde{\psi}_{R}} \\ {\tilde{\chi}_{R}}\end{array}\right) &\rightarrow\left(\begin{array}{cc}{\cos \varphi_{\tilde{\psi}_{R}}} & {-\sin \varphi_{\tilde{\psi}_{R}}} \\ {\sin \varphi_{\tilde{\psi}_{R}}} & {\cos \varphi_{\tilde{\psi}_{R}}}\end{array}\right)\left(\begin{array}{c}{\tilde{\psi}_{R}} \\ {\tilde{\chi}_{R}}\end{array}\right), \quad \tan \varphi_{\tilde{\psi}_{R}}&=\frac{\tilde{\Delta}}{\tilde{m}}
\end{align}
\end{document}

• \hfill doesnt working as you liked. You need to use some adequate math environment (array, alignat, etc). For help please provide MWE that we not need to rewrite your equations from scratch. Otherwise your question probably will be closed as "to broad". Jul 18, 2019 at 9:45
• @Zarko MWE added. Jul 18, 2019 at 9:51
• sorry, this is only code fragment, not an MWE. Please extend it to complete small document. Jul 18, 2019 at 9:52
• @Zarko sorry, updated. Please let me know if it does not work for you. Jul 18, 2019 at 9:58
• see my answer. it maybe provide what you looking for :-) Jul 18, 2019 at 10:10

like this?

with use of pmatrix from asmath and extend align environment with one more ampersand:

\documentclass{article}
\usepackage{amsmath,amssymb,amsthm}

\begin{document}
\begin{align}
\begin{pmatrix}
A_{\mu}\\ \rho_{\mu}^{*}
\end{pmatrix}
& \rightarrow   \begin{pmatrix}
\cos \theta & -\sin \theta \\
\sin \theta &  \cos \theta
\end{pmatrix}\begin{pmatrix}
A_{\mu} \\ \rho_{\mu}^{*}
\end{pmatrix},
&   \tan \theta & = \frac{g_{e l}}{g_{*}}         \\
\begin{pmatrix}\psi_{L} \\ \chi_{L} \end{pmatrix}
& \rightarrow   \begin{pmatrix}
\cos \varphi_{\psi_{L}} & -\sin \varphi_{\psi_{L}} \\
\sin \varphi_{\psi_{L}} &  \cos \varphi_{\psi_{L}}
\end{pmatrix}\begin{pmatrix}
\psi_{L} \\ \chi_{L}
\end{pmatrix},
&   \tan \varphi_{\psi_{L}}
& = \frac{\Delta}{m}    \\
\begin{pmatrix}
\tilde{\psi}_{R} \\  \tilde{\chi}_{R}
\end{pmatrix}
& \rightarrow   \begin{pmatrix}
\cos \varphi_{\tilde{\psi}_{R}} & -\sin \varphi_{\tilde{\psi}_{R}}  \\
\sin \varphi_{\tilde{\psi}_{R}} &  \cos \varphi_{\tilde{\psi}_{R}}
\end{pmatrix}\begin{pmatrix}
\tilde{\psi}_{R} \\\tilde{\chi}_{R}
\end{pmatrix},
&   \tan \varphi_{\tilde{\psi}_{R}}
& =\frac{\tilde{\Delta}}{\tilde{m}}
\end{align}
\end{document}


I'd propose alignat, that gives more control of spacing between the column pairs.

The second parts of each row should not, in my opinion, be aligned at the equals sign, because the prominence should be to “tan”.

\documentclass[11pt, oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage{amsmath}
\begin{document}
\begin{alignat}{2}
\begin{pmatrix} A_{\mu} \\ \rho_{\mu}^{*} \end{pmatrix}
& \rightarrow
\begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}
\begin{pmatrix} A_{\mu} \\ \rho_{\mu}^{*} \end{pmatrix},
&\quad& \tan \theta = \frac{g_{e l}}{g_{*}}
\\
\begin{pmatrix} \psi_{L} \\ \chi_{L} \end{pmatrix}
& \rightarrow
\begin{pmatrix}
\cos \varphi_{\psi_{L}} & -\sin \varphi_{\psi_{L}} \\
\sin \varphi_{\psi_{L}} & \cos \varphi_{\psi_{L}}
\end{pmatrix}
\begin{pmatrix} \psi_{L} \\ \chi_{L} \end{pmatrix},
&& \tan \varphi_{\psi_{L}} = \frac{\Delta}{m}
\\
\begin{pmatrix} \tilde{\psi}_{R} \\ \tilde{\chi}_{R} \end{pmatrix}
& \rightarrow
\begin{pmatrix}
\cos \varphi_{\tilde{\psi}_{R}} & -\sin \varphi_{\tilde{\psi}_{R}} \\
\sin \varphi_{\tilde{\psi}_{R}} & \cos \varphi_{\tilde{\psi}_{R}}
\end{pmatrix}
\begin{pmatrix} \tilde{\psi}_{R} \\ \tilde{\chi}_{R} \end{pmatrix},
&& \tan \varphi_{\tilde{\psi}_{R}} = \frac{\tilde{\Delta}}{\tilde{m}}
\end{alignat}

\end{document}


Your opinion may differ. In any case, avoid overusing braces.