# Two aligning indexes in equation

I would like to align the \Longleftrightarrow's with each other, such that the second one is in the same vertical space as the first one, and to not tamper with the aligning of the equal signs (the equals sign in the line with the second \Longleftrightarrow isn't in question).

I'm not sure how to use the ampersands to align both, but in two different places.

\begin{split}
a^a = b^b \Longleftrightarrow a & = \log_a{b^b} \\
& = b\log_a{b}. \\
& = \frac{b\ln b}{\ln a} \\
\Longleftrightarrow a\ln a = b\ln b.
\end{split}

• Hi and welcome to TeX.SX. I think if you add an amper sign in the last line so \Longleftrightarrow a&\ln a... it would solve your problem. Also, next time it would be easier to help you if you don't put a code snippet, but rather, a full Minimal Working Example from \documentclass{ to \end{document} Commented Oct 13, 2020 at 20:24

You can align your split to the arrows, and use the aligned environment to align three lines by =. An optional argument helps with correct positioning of the aligned rows:
\documentclass{article}
\begin{split} a^a = b^b &\Longleftrightarrow \begin{aligned}[t] a & = \log_a{b^b} \\ & = b\log_a{b}. \\ & = \frac{b\ln b}{\ln a} \end{aligned}\\ &\Longleftrightarrow a\ln a = b\ln b. \end{split}