2

I am trying to left-align some equations so they line up nicely.

I'm using align with [fleqn] per this question and setlength per this question. But it doesn't seem to have worked. I tried the fleqn environment too per this question but it didn't do the trick either.

enter image description here

\documentclass{article}

\usepackage[fleqn]{mathtools}
\setlength{\mathindent}{0pt}

\begin{document}

\begin{align*}
A\triangleright B\triangleright A & \iff & x'Ax\geq x'Bx\cap x'Bx\geq x'Ax\forall x\\
 & \iff & x'Ax=x'Bx\cap x'Bx=x'Ax\forall x\\
 & \iff & x'Ax=x'Bx\forall x\\
 & \iff & x'Ax-x'Bx=0\forall x\\
 & \iff & x'(A-B)x=0\forall x
\end{align*}

\end{document}
2
  • Welcome to TeX.SE. Please make your code compilable. As of now, it has no chance of doing so since you've embedded an align environment inside \[...\].
    – Mico
    Jan 29, 2016 at 2:22
  • @Mico Thanks for the welcome. Edited removing brackets.
    – Hatshepsut
    Jan 29, 2016 at 2:24

1 Answer 1

3

Is the following what you want? It's achieved by removing the second & alignment point from each row. (Note that whereas the deprecated eqnarray syntax requires two &s, align requires only one.)

enter image description here

\documentclass{article}
\usepackage[fleqn]{amsmath}
\setlength{\mathindent}{0pt}

\begin{document}
\hrule % just to illustrate the width of the text block
\begin{align*}
A\triangleright B\triangleright A 
 & \iff x'Ax\geq x'Bx\cap x'Bx\geq x'Ax\forall x\\
 & \iff x'Ax=x'Bx\cap x'Bx=x'Ax\forall x\\
 & \iff x'Ax=x'Bx\forall x\\
 & \iff x'Ax-x'Bx=0\forall x\\
 & \iff x'(A-B)x=0\forall x
\end{align*}

\end{document}
1
  • Yep, it was the difference between eqnarray and align that got me. Thanks!
    – Hatshepsut
    Jan 29, 2016 at 2:38

You must log in to answer this question.

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