0

The command

\begin{align*} 1 = 1 = 2 & &  2 + 2 = 4 \end{align*}

aligns both equations to the right. How can I changes this to align both identities to the left?

David Carlisle
  • 757,742
  • 1
    I think you want two lines here, and alignment is usually on the sign of relation, which here would also result in the left side being aligned: \begin{align*} 1 + 1 &= 2 \\ 2 + 2 &= 4 \end{align*}. You would benefit from reading the documentation for the amsmath package. – barbara beeton Mar 15 '23 at 14:09
  • did you mean 1+1 =2 ?? – David Carlisle Mar 15 '23 at 14:59

2 Answers2

4

The usual style is to have one & in each equation, and one & or one \\ between equations

enter image description here

\documentclass{article}

\usepackage{amsmath}

\begin{document}

on one line \begin{align} 1 + 1 &= 2 & 2 + 2 &= 4 \end{align}

on two \begin{align} 1 + 1 &= 2 \ 2 + 2 &= 4 \end{align}

\end{document}

Or if you want equations flush left add fleqn

enter image description here

\documentclass[fleqn]{article}

\usepackage{amsmath}

\begin{document}

on one line \begin{align} 1 + 1 &= 2 & 2 + 2 &= 4 \end{align}

on two \begin{align} 1 + 1 &= 2 \ 2 + 2 &= 4 \end{align}

\end{document}

David Carlisle
  • 757,742
0

The first thing I would like to note is that the first formula has a typo. It should be 1 + 1 = 2 and not 1 = 1 = 2.

You could left-align both formulas by writing them on different lines, which you could do, for example, by replacing the & & with a \\, since the \\ introduces a newline:

\begin{align*}
   1 + 1 &= 2\\
   2 + 2 &= 4\\
\end{align*}

multible lines

However, if you still want to have both formulas on the same line, you could also work directly with line spacing. These would not change the alignment from the left. The most commonly used line spacings are ~ (small space), \quad (medium space), \qquad (large space) and \,, \;, ... (tiny space):

\begin{align*}
   1 + 1 = 2 \qquad 2 + 2 = 4
\end{align*}

line spacing

However, if you insist on the & & you could use a command other than align* which uses the & & as spaces or columns, e.g. matrix:

\begin{align*}
   \begin{matrix} 1 + 1 = 2 & & 2 + 2 = 4 \end{matrix}
\end{align*}

other commands

Another way to achieve this would be to insert empty text into the LaTeX code, e.g. with \text{}, \operatorname{}, ...:

\begin{align*}
   1 + 1 = 2 \text{ } \text{ } \text{ } \text{ } 2 + 2 = 4
\end{align*}

text

If you do want to have everything flushed left, you can also start the article with \documentclass[fleqn]{article}.