This question came from our site for professional and enthusiast programmers.

@HagenBrenner - I get the equations aligned as you wanted (at = and start of line) using your code and pdflatex.
–
mathematical.coffeeJan 13 '12 at 2:21

This is because your setting are set up so that all your equations are aligned left (start of line). My equations are all centered. But I want this particular one to be left aligned.
–
Hagen BrennerJan 13 '12 at 9:09

Hi egreg, this solutions is brilliant! thank you so much! there is just one thing that disturbs me. the space between the lines of the array is to small. I put in brackts the space in cm behind \\. Is there a more generic way to do this?
–
Hagen BrennerJan 13 '12 at 13:12

@HagenBrenner You might set \arraystretch to a different value: for example \renewcommand{\arraystretch}{1.2} just after \begin{flalign*} or, in any case, before the array environment.
–
egregJan 13 '12 at 13:27

You can use \phantom to apply the appropriate spacing within the align environment to ensure that the y is aligned with the a and the = signs are also aligned. If you want this entire equation adjacent to the left margin you can use flalign.

Note:

Note the trailing & which is needed to get equation all the way to the left margin.

Code:

\documentclass{article}
\usepackage{amsmath}
%\usepackage[showframe]{geometry}% Uncomment to see margins
\begin{document}
\begin{flalign*}
a+b+c&=1 &\\% Need this trailing alignment char to get all the way left
y\phantom{{}+b+c} &=2 &
\end{flalign*}
\end{document}

Thanks for your reply! But this answere does not left-align the formulas. My formulas are all centered. Again, my question is: How can write formulas like this but in addition to that left align them? I want the left alignment only for this single formula, not for all formulas.
–
Hagen BrennerJan 13 '12 at 8:55

Explanation: align is an environment for shifting between left-aligned columns and right-aligned ones, so if you want your equation to be shown as a totally left-aligned one, you need to add an extra column between the left-aligned columns. In the above example, first & in each line makes a left-aligned column, if you delete this ones you'll get a right-aligned column. The second ampersands in each line make a right-aligned column but we don't need this column so we add a third column by adding an & after the last ampersands in each line. flalign is a variation of align that increases the space between columns so as to cover the line completely. alignat omits unnecessary spaces between the columns (the other difference between alignat and align is that the first one takes an argument which shows the number of the columns). Note that adding a * after each of these three, makes them untaged.