# Aligning the right hand side of multiline equations

I would like to align the RHS of the multiline equations and assign equation number for whole as one.

\begin{multline*}
\frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}=\tfrac {a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}a^{2}(1-\tau^{2})^{2}\left(z_{1i}\prime\gamma_{1j}\right)^{2}}\\
\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau \left(z_{1i}\prime\gamma_{1j}\right)\right)\gamma_{1j}+\tfrac {b(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}b^{2j}(1-\tau^{2})^{2}\left(\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)^{2}}\\
\Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}\\
\end{multline*}

\begin{multline*}
=\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau z_{1i}\prime\gamma_{1j}\right)\gamma_{1j}\\
+\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}
\end{multline*}

\begin{multline*}
=\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(\tfrac{\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-\tau z_{1i}\prime\gamma_{1}}{(1-\tau^{2})^{1/2}}\right)\gamma_{1j}\\
+\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(\tfrac{z_{1i}\prime\gamma_{1j}-\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}}{(1-\tau^{2})^{1/2}}\right)\tfrac{\gamma_{2j}}{\tau}
\end{multline*}


How do I do that?. I couldn't get it using align

\documentclass[preview,border=12pt]{standalone}
\usepackage[a4paper,margin=1cm]{geometry}
\usepackage{mathtools}
\begin{document}
\abovedisplayskip=0pt\relax% don't use this line in your production (egreg does not like this)
\begin{equation}
\begin{split}
\frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}
&=
\!
\begin{multlined}[t][10cm]
\tfrac{a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}a^{2}(1-\tau^{2})^{2}\left(z_{1i}\prime\gamma_{1j}\right)^{2}}
\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}
-a\tau \left(z_{1i}\prime\gamma_{1j}\right)\right)
\gamma_{1j}\\
+\tfrac {b(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}b^{2j}(1-\tau^{2})^{2}\left(\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)^{2}}\\
\Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}
\end{multlined}\\
&=
\!
\begin{multlined}[t][10cm]
\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau z_{1i}\prime\gamma_{1j}\right)\gamma_{1j}\\
+\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(a\left(z_{1i}\prime\gamma_{1j}\right)-b\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}\right)\tfrac{\gamma_{2j}}{\tau}
\end{multlined}\\
&=
\!
\begin{multlined}[t][10cm]
\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(\tfrac{\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-\tau z_{1i}\prime\gamma_{1}}{(1-\tau^{2})^{1/2}}\right)\gamma_{1j}\\
+\phi\left(\tfrac{z_{2i}\prime\gamma_{2}}{\sigma}\right)\Phi\left(\tfrac{z_{1i}\prime\gamma_{1j}-\tau \tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}}{(1-\tau^{2})^{1/2}}\right)\tfrac{\gamma_{2j}}{\tau}
\end{multlined}
\end{split}
\end{equation}
\end{document} For better resolution click this

• primes are really bad. as mentioned by others, either use ^{\prime} or an apostrophe. – barbara beeton Oct 27 '13 at 2:19

As far as I understand your intentions:

\documentclass{article}

\usepackage{amsmath}

\begin{document}

\begin{equation}
\begin{aligned}
\frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}&=\tfrac {a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}} e^{-\tfrac{1}{2}a^{2}(1\tau^{2})^{2}\left(z_{1i}\prime\gamma_{1j}\right)^{2}}\times\\
&=\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(b\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-a\tau z_{1i}\prime\gamma_{1j}\right)\gamma_{1j}\\
&=\phi\left(z_{1i}\prime\gamma_{1}\right)\Phi\left(\tfrac{\tfrac{z_{2i}\prime\gamma_{2j}}{\sigma}-\tau z_{1i}\prime\gamma_{1}}{(1-\tau^{2})^{1/2}}\right)\gamma_{1j}\\
\end{aligned}
\end{equation}

\end{document} Some changes are still needed. In particular, \prime's look very strange.

Here's a tentative solution that uses the split environment inside an equation environment to ensure that the entire construct is assigned just one "number".

Note that I've used \qquad to indent terms multiplicatively linked to the preceding material, and \quad for terms linked additively to the preceding material. I've also replaced various \prime statements with '; if you prefer \prime, I believe it should be typeset in superscript position, and thus should be entered as ^{\prime}. Finally, in the lines following the third equal sign, I've replaced the \left( and \right) statements encasing the big \Phi terms with \biggl( and \biggr) as the parentheses otherwise completely dominate, visually speaking. \documentclass{article}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
\frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}
&=\tfrac {a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}}
e^{-\tfrac{1}{2}a^{2}(1-\tau^{2})^{2} \left(z_{1i}'\gamma_{1j}\right)^{2}}\\
e^{-\tfrac{1}{2}b^{2j}(1-\tau^{2})^{2}\left(\tfrac{z_{2i}'\gamma_{2j}}{\sigma}\right)^{2}}\\
&=\phi\left(z_{1i}'\gamma_{1}\right)\Phi\left(b\tfrac{z_{2i}'\gamma_{2j}}{\sigma}-a\tau z_{1i}'\gamma_{1j}\right)\gamma_{1j}\\
&=\phi\left(z_{1i}'\gamma_{1}\right)
\Phi\biggl(\tfrac{\tfrac{z_{2i}'\gamma_{2j}}{\sigma}-\tau z_{1i}'\gamma_{1}}{(1-\tau^{2})^{1/2}}\biggr)\gamma_{1j}\\
\Phi\biggl(\tfrac{z_{1i}'\gamma_{1j}-\tau \tfrac{z_{2i}'\gamma_{2j}}{\sigma}}{(1-\tau^{2})^{1/2}}\biggr)\tfrac{\gamma_{2j}}{\tau}
\end{split}
\end{equation}
\end{document}


Addendum: Assuming your text block is sufficiently wide, the whole equation construct could be typeset in four lines instead of eight; however, I don't think the intelligibility increases from such an attempt to economize on vertical space: \documentclass{article}
\usepackage[margin=1in]{geometry}
\usepackage{amsmath}
\begin{document}
\begin{equation}
\begin{split}
\frac{\partial P(y_{i}\succ0)} {\partial z_{ij}}
&=\tfrac {a(1-\tau^{2})^{1/2}}{(2 \pi)^{1/2}}
e^{-\tfrac{1}{2}a^{2}(1-\tau^{2})^{2} \left(z_{1i}'\gamma_{1j}\right)^{2}}
\Phi\left(b\tfrac{z_{2i}'\gamma_{2j}}{\sigma}-a\tau \left(z_{1i}'\gamma_{1j}\right)\right)\gamma_{1j}\\