[Tex/LaTex] Is it possible to use align inside a array environment

alignarrays

I am preparing a class and I ran into this problem…
Is it possible to use align inside a array environment?

I was thinking of putting 4 equations as the elements of a matrix.
But the first element contains 2 rows, aligned as below

\begin{array}{ll}
\begin{align*}
d_1 &=\frac{ ln\left(\frac{F^P_{t,T}(S)}{F^P_{t,T}(K)}\right) + \left(\frac{ \sigma^2}{2}\right) (T-t)} {\sigma \sqrt{T-t}}\\
&= \frac{ ln\left(\frac{90.1242}{90.3668}\right) + \left(\frac{ 0.25^2}{2}\right) (1)} {0.25 \sqrt{1}}=0.1142
\end{align*}                                               &            N(d_1)=\\ 
d_2=0.1142 - 0.25 = -0.1358                               &         N(d_2)= \] 

Probably it is not possible because both use the symbol &.
Any suggestions?

Thanks

Best Answer

amsmath provides many environments like aligned, alignedat etc which may be handy for such cases. For details, refer to amsldoc (texdoc amsldoc from terminal)

Here is a shot using aligned:

 \documentclass{article}
\usepackage{amsmath}
\begin{document}
  \[\begin{array}{ll}
\begin{aligned}%[t]
d_1 &=\frac{ \ln\left(\frac{F^P_{t,T}(S)}{F^P_{t,T}(K)}\right) + \left(\frac{ \sigma^2}{2}\right) (T-t)} {σ\sqrt{T-t}}\\
&= \frac{ \ln\left(\frac{90.1242}{90.3668}\right) + \left(\frac{ 0.25^2}{2}\right) (1)} {0.25 \sqrt{1}}=0.1142
\end{aligned}                                               &            N(d_1)=\\
d_2=0.1142 - 0.25 = -0.1358                               &         N(d_2)=
\end{array}
\]
\end{document}

enter image description here

If you want to align at more than one point, you may consider using alignedat.

A better way would be to use alignedat alone without array.

Related Question