# least squares equation in LaTeX

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

• Welcome! What have you got so far? – cfr Sep 13 '15 at 2:31
• 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

\documentclass{amsart}

\begin{document}

$$\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{document}


EDIT:

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

\documentclass{amsart}

\begin{document}

$$\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{document}

• 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
• @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