Matrix of Shift Transform on arbitrary basis This is problem 4.4.8 of Algebra by Artin.
Let $V$ be a vector space with basis $(v_1,...,v_n)$ over a field $F$, and let $a_1,...,a_{n-1}$ be elements of $F$. Define a linear operator on $V$ by the rules $T(v_i) = v_{i+1}$ if $i<n$ and $T(v_n) = a_1v_1+a_2v_2+... + a_{n-1}v_{n-1}$. Determine the matrix of $T$ with respect to the given basis.
I considered the problem for a while but, my algebra skills are not so fine. If the basis was the standard basis, or orthonormal basis, the problem wouldn't be that challenging since the matrix below should satisfy this requirement
\begin{gather*}
T=\begin{pmatrix}
| &  & | & a_1\\
v_2&... & v_{n-1}& \vdots\\
|&& | & a_{n-1}\\
|& &| & 0
\end{pmatrix}
\end{gather*}
But, the problem says to find $T$ with respect to the given basis, and I am stuck. I tried to use $v_i=(b_{1i} ... b_{ni})^T$ as a an arbitrary vector and doing the algebra directly but, that approach seems to be a fairly long and tedious process without many actual results. Any ideas or hints would be great, cheers.
 A: You want the matrix of an operator $T$ which takes the basis $(v_1,\cdots, v_n)$ to the basis $(v_2,\cdots, v_n, a_1v_1+\cdots +a_{n-1}v_{n-1})$.  Write both of these as column vectors (of row vectors) $\begin{bmatrix}v_1\\ \vdots\\ v_n\end{bmatrix}$ and $\begin{bmatrix}v_2\\ \vdots\\ v_n \\ a_1v_1+\cdots +a_{n-1}v_{n-1}\end{bmatrix}$.  So you need to find $T$ satisfying $$\begin{bmatrix}v_2\\ \vdots\\ v_n \\ a_1v_1+\cdots +a_{n-1}v_{n-1}\end{bmatrix} = \begin{bmatrix}t_{11} &\cdots t_{1n} \\ \vdots\\ t_{n1} &\cdots t_{nn}\end{bmatrix}\begin{bmatrix}v_1\\ \vdots\\ v_n\end{bmatrix}.$$  Do it element by element: what is the simplest and most reasonable choice for the first row of $T$ so that $t_{11}v_1 + \cdots t_{1n}v_n = v_2$?  Carry on.  When you reach the last row,  what are the $t_{ni}$ that will satisfy $$ t_{n1}v_1 +\cdots t_{nn}v_n = a_1v_1+\cdots +a_{n-1}v_{n-1}?$$  This gives you a matrix $M$.
Now the entries of each basis are written as row vectors in the two sides of the equation.  To get column vectors apply the transpose to both sides of the equation to get finally $$\begin{bmatrix}v_2 &\cdots & v_n & a_1v_1+\cdots a_{n-1}v_{n-1} \end{bmatrix}=M^T \begin{bmatrix}v_1 &\cdots & v_n \end{bmatrix}.$$
