0

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

  • Welcome! What have you got so far? – cfr Sep 13 '15 at 2:31
  • 4
    My (perhaps shaky) understanding is that you don't ever use the \times symbol to represent matrix multiplication, because it could be ambiguous with the cross product. – Will Robertson Sep 13 '15 at 4:39
  • are the delimiters of the part before the equals sign "celiling"s, or regular brackets? (they look to be like \lceil and \rceil, but i could be mistaken.) – barbara beeton Sep 13 '15 at 14:26
4
\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}
  • 1
    very big thanx that work, I tired of trying :( – omran Sep 13 '15 at 2:37
  • Feel free to accept it ;) – JPi Sep 13 '15 at 2:41
  • I had forced to wait 8 minuts :D – omran Sep 13 '15 at 2:52
  • 1
    @JPi -- please note the question i asked in a comment above, about the delimiters for the first element of the equation. – barbara beeton Sep 13 '15 at 14:27
  • thanks @barbarabeeton. That hadn't occurred to me. I am a bit puzzled by the use of different types of delimiters on the left and right hand sides regardless. – JPi Sep 13 '15 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.