[Tex/LaTex] least squares equation in LaTeX

math-mode

How I can write this equation in LaTeX,enter image description here which represents the least squares method?

Best Answer

\documentclass{amsart}


\begin{document}

\begin{equation}
\begin{bmatrix}
 y_1 \\ \vdots \\ y_{34} 
 \end{bmatrix}
 =
 \begin{pmatrix}
  -y_0 && u & u\\
  \vdots && \vdots & \vdots \\
  -y_{33} && u & u
  \end{pmatrix}
  \times
  \begin{pmatrix}
  a \\ b_0 \\ b_1
  \end{pmatrix}
\end{equation}
\end{document}

enter image description here

EDIT:

If you want the type of brackets that Barbara Beeton think you might want, then the following would work.

\documentclass{amsart}


\begin{document}

\begin{equation}
\left\lceil
\begin{array}{c}
 y_1 \\ \vdots \\ y_{34} 
 \end{array}
 \right\rceil
 =
 \begin{pmatrix}
  -y_0 && u & u\\
  \vdots && \vdots & \vdots \\
  -y_{33} && u & u
  \end{pmatrix}
  \times
  \begin{pmatrix}
  a \\ b_0 \\ b_1
  \end{pmatrix}
\end{equation}
\end{document}
Related Question