Why do I get this matrix the wrong way round? The question is: The set B = {${1+t^2, t+t^2, 1+2t+t^2}$} is a basis for P2. Find the coordinate vector of $p(t)=1+4t+7t^2$ relatvive to B.
I made a matrix:
  \begin{bmatrix}
    1 & 0 & 1 & 1\\ 0 & 1 & 2 & 4\\
    0 & 1 & 0 & 6
  \end{bmatrix}
When I row reduce it I get:
\begin{bmatrix}
    1 & 0 & 0 & -1\\ 0 & 1 & 0 & 6\\
    0 & 0 & 1 & 2
  \end{bmatrix}
But the solutions (and MATLAB) say it's:
\begin{bmatrix}
    1 & 0 & 0 & 2\\ 0 & 1 & 0 & 6\\
    0 & 0 & 1 & -1
  \end{bmatrix}
I've tried it many times and I still end up with the same matrix. Does anyone know what I've done wrong?
Thanks

Here is one sequence of steps to row reduce the matrix.
\begin{bmatrix}
    1 & 0 & 1 & 1\\ 0 & 1 & 2 & 4\\
    0 & 1 & 0 & 6
  \end{bmatrix}
Subtract the second row from the third:
\begin{bmatrix}
    1 & 0 & 1 & 1\\ 0 & 1 & 2 & 4\\
    0 & 0 & -2 & 2
  \end{bmatrix}
Add the third to the second:
\begin{bmatrix}
    1 & 0 & 1 & 1\\ 0 & 1 & 0 & 6\\
    0 & 0 & -2 & 2
  \end{bmatrix}
Divide the third by $2$:
\begin{bmatrix}
    1 & 0 & 1 & 1\\ 0 & 1 & 0 & 6\\
    0 & 0 & -1 & 1
  \end{bmatrix}
Add the third to the first:
\begin{bmatrix}
    1 & 0 & 0 & 2 \\ 0 & 1 & 0 & 6\\
    0 & 0 & -1 & 1
  \end{bmatrix}
Multiply the third by $-1$:
\begin{bmatrix}
    1 & 0 & 0 & 2 \\ 0 & 1 & 0 & 6\\
    0 & 0 & 1 & -1
  \end{bmatrix}
