[Tex/LaTex] How to align left bracket equation

equationshorizontal alignmentmatrices

\begin{equation}
    \left\{
    \begin{matrix}
    Maximiser &L(\alpha)=\sum_{i=1}^{n} \alpha_i -\sum_{i=1}^{n}\sum_{j=1}^{n}\alpha_i \alpha_j y_iy_j \textbf{x}^T\textbf{x} &\\ 
    \text{sous contraintes} & & \\ 
    &  \sum_{i=1}^{n}\alpha_iy_i=0 \\
    & \alpha_i>0&
    \end{matrix}
    \right.
\end{equation}

enter image description here

Best Answer

I would like to suggest that (a) the equations be typeset in display style -- done most easily by using a dcases environment -- and (b) the constraint statements be aligned on their respective inequality/equality particles -- using, say, an aligned environment. Oh, and do use \mathbf instead of \textbf while in math mode.

enter image description here

\documentclass{article}
\usepackage{mathtools,mathptmx}
\begin{document}
\begin{equation}
\begin{dcases}
\text{Maximiser} &
L(\alpha)=\sum_{i=1}^{n} \alpha_i 
  -\sum_{i=1}^{n}\sum_{j=1}^{n}\alpha_i \alpha_j y_iy_j \mathbf{x}^T\!\mathbf{x} \\ 
\text{sous contraintes} &
\!\begin{aligned}[t]
   \sum_{i=1}^{n}\alpha_iy_i&=0 \\
   \forall\ i\colon\alpha_i&>0
\end{aligned}
\end{dcases}
\end{equation}
\end{document}
Related Question