3

Equation in question, need to align if and only if arrows together and equal signs together

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}
1
  • 3
    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}
    – Elad Den
    Commented Oct 13, 2020 at 20:24

1 Answer 1

6

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}
\usepackage{mathtools}
\begin{document}
\[
\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}
\]
\end{document}

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .