1

I was trying to align the following equations but alas. Could someone guide?

\begin{flalign}
x \in A \cap (B \cup C)
& \Rightarrow (x \in A) \lambda \Big( (x \in B)\vee(x \in C) \Big) & \\
& \Rightarrow \Big( (x \in A) \lambda (x \in B) \Big) \vee \Big( (x \in A) \lambda (x \in C) \Big) & \\
& \Rightarrow (x \in A \cap B) \lambda ( x \in A \cap C) & \\
& \Rightarrow x \in (A \cap B) \cup (A \cap C) 
\end{flalign}

to look like

a => b
  => c
  => d
  => e

Here's the preamble that I used:

\documentclass[oneside]{book}

\title{Basic Typesetting of Mathematics}
\usepackage[fleqn]{amsmath}
\setlength{\mathindent}{0pt}

I am using Texmaker and it's not recognising \begin{flalign*} or \end{flalign*}. Gives weird compilation errors. Any ideas?

3 Answers 3

3

Your code is compiling just fine.

I've made the parentheses a bit smaller and used the left/right versions of them to get better horizontal spacing. Also, there were unnecessary ampersands.

Version 1:

\documentclass[oneside]{book}

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

\begin{document}

\begin{flalign}
x \in A \cap (B \cup C)
&\Rightarrow (x \in A) \lambda \bigl((x \in B) \vee (x \in C)\bigr)\\
&\Rightarrow \bigl((x \in A) \lambda (x \in B)\bigr) \vee \bigl((x \in A) \lambda (x \in C)\bigr)\\
&\Rightarrow (x \in A \cap B) \lambda (x \in A \cap C)\\
&\Rightarrow x \in (A \cap B) \cup (A \cap C) 
\end{flalign}

\end{document}

output1

Version 2: Using daleif's suggestion from the comment to this answer, you get

\documentclass[oneside]{book}

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

\newcommand*\implic{\quad\Rightarrow\quad}

\begin{document}

\begin{flalign}
x \in A \cap (B \cup C)
&\implic  (x \in A) \lambda \bigl((x \in B) \vee (x \in C)\bigr)\\
&\implic \bigl((x \in A) \lambda (x \in B)\bigr) \vee \bigl((x \in A) \lambda (x \in C)\bigr)\\
&\implic (x \in A \cap B) \lambda (x \in A \cap C)\\
&\implic x \in (A \cap B) \cup (A \cap C) 
\end{flalign}

\end{document}

output2

3

This code works. I removed big brackets to have the same space between equations

\documentclass[oneside]{book}
\usepackage[fleqn]{amsmath}
\setlength{\mathindent}{0pt}
\begin{document}
\begin{flalign}
     x \in A \cap (B \cup C)
        & \Rightarrow (x \in A) \lambda \left( (x \in B)\vee(x \in C) \right) & \\
        & \Rightarrow \left( (x \in A) \lambda (x \in B) \right) \vee \left( (x \in A)\lambda (x \in C) \right) & \\
        & \Rightarrow (x \in A \cap B) \lambda ( x \in A \cap C) & \\
        & \Rightarrow x \in (A \cap B) \cup (A \cap C) 
\end{flalign}
\end{document}

enter image description here

2
  • @Abi: the best way to thank others is not saying +1, but rather upvoting the answers and accepting the best one; have a look to TeX.SX tour. Feb 21, 2014 at 12:39
  • Oh @ClaudioFiandrino I had less reputation :P here so wanted to thank anyways regardless of that.. But now I did.. Thank you again :*
    – meowthecat
    Feb 22, 2014 at 20:01
2

This code works for me:

\documentclass[oneside]{book}
\usepackage[fleqn]{amsmath}
\setlength{\mathindent}{0pt}
\begin{document}
\begin{flalign}
 x \in A \cap (B \cup C)
  & \Rightarrow (x \in A) \lambda \Big( (x \in B)\vee(x \in C) \Big) & \\
  & \Rightarrow \Big( (x \in A) \lambda (x \in B) \Big) \vee \Big( (x \in A)\lambda (x \in C) \Big) & \\
  & \Rightarrow (x \in A \cap B) \lambda ( x \in A \cap C) & \\
  & \Rightarrow x \in (A \cap B) \cup (A \cap C) 
\end{flalign}
\end{document}
2
  • Thank you !! It works perfectly the way I wanted :) +++1
    – meowthecat
    Feb 21, 2014 at 10:45
  • 2
    Might look better if you added extra space around the \Rightarrow, I usually use \Rightarrowx as a short for \quad\Rightarrow\quad
    – daleif
    Feb 21, 2014 at 11:00

You must log in to answer this question.

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