# [Tex/LaTex] Align equation left

alignequations

Here is my split equation:

\documentclass{article}
\usepackage{amsmath}
\begin{document}
$$\begin{split} a_{ijk} =& \frac {Pr(M_{I} =2 \& M_J=1 \& M_K =1 | I=i , J=j , K=k)}{Pr (M_I =1 \& M_J =1 \& M_K=1 | I=i , J=j)} \\ =& \frac {\mu_{ijk211}}{\mu_{ijk111}}\\ \end{split}$$
\end{document}


I want to align this equation to the left. Is this possible in an equation environment?

I would not use the equation environment; rather, I would use flalign as such:
(notice the && at the end of each line)

\documentclass{article}
\usepackage{amsmath}
\begin{document}
\noindent A \hfill Z
\begin{flalign}
a_{ijk} &= \frac {Pr(M_{I} =2  \&  M_J=1 \& M_K =1 | I=i , J=j , K=k)}{Pr (M_I =1 \& M_J =1 \& M_K=1 | I=i , J=j)}&&\\\nonumber
&= \frac {\mu_{ijk211}}{\mu_{ijk111}}&&
\end{flalign}

\noindent A \hfill Z
\end{document}


Another way to go is to set the fleqn option for the document class. However, this left-aligns all of your equations and hence should not be used when you want at least some equations to remain centered.

\documentclass[fleqn]{article}
\usepackage{amsmath}
\begin{document}
\noindent A \hfill Z
\begin{aligned} a_{ijk} &= \frac {Pr(M_{I} =2 \& M_J=1 \& M_K =1 | I=i , J=j , K=k)}{Pr (M_I =1 \& M_J =1 \& M_K=1 | I=i , J=j)}\\ &= \frac {\mu_{ijk211}}{\mu_{ijk111}}\\ \end{aligned}
\noindent A \hfill Z
\end{document}


For this output:

As suggested by karlkoeller, if you want to get rid of the space between the left margin and the equation (to get a result similar to the first case), you should add \setlength{\mathindent}{0pt}. If you later want to indent it back to its default value, you can use the same command with a value of 15pt, which is the amount of pt a paragraph indent shifts its text to the right.