Matrix function from canonical base to base $B$ Let's say I have a function $F=\begin{bmatrix}\frac{1}{2} & 1 & \frac{1}{2}\\ 0 & 1 & 0\\ -\frac{1}{2} & 1 & \frac{3}{2}\end{bmatrix}$ defined with respect to the canonical basis. 
I found out that the respective function defined with three variables is: $$f(x,y,z)=(\frac{1}{2}x+y+\frac{1}{2}z,y, -\frac{1}{2}x+y+\frac{3}{2}z)$$ 
Now, I would like to define the function $F$ with respect to the basis $B=\{(1,0,1), (1,1,1), (1, 1, -1) \}$ 
So I did:
$$f(1, 0, 1)_{|B}=(1, 0, 1)_{|B}, f(1, 1, 1)_{|B}=(2, 1, 2)_{|B}, f(1, 1, -1)_{|B}=(1, 1, -1)_{|B}$$
My textbook states that the matrix $F_{|B} = \begin{bmatrix}1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{bmatrix}$, but shouldn't it be $F_{|B} = \begin{bmatrix}1 & 2 & 1 \\ 0 & 1 & 1 \\ 1 & 2 & -1\end{bmatrix}$?

Think of $f$ as a function that eats a vector $\mathbf v$ and spits out another vector $f(\mathbf v)$. If we represent $\mathbf v$ by its coordinates relative to the standard basis, which I’ll denote by $[\mathbf v]_{\mathcal E}$, then you have the formula $[f(\mathbf v)]_{\mathcal E} = F[\mathbf v]_{\mathcal E}$: the matrix $F$ expects coordinates relative to the standard basis and produces coordinates relative to the standard basis.  
This problem wants you to find some other matrix $F'$ such that $[f(\mathbf v)]_{\mathcal B}=F'[\mathbf v]_{\mathcal B}$ for some other ordered basis $\mathcal B$. Well, you can convert $[\mathbf v]_{\mathcal B}$ into $[\mathbf v]_{\mathcal E}$ by multiplying it by the appropriate change-of-basis matrix $B$: $[\mathbf v]_{\mathcal E} = B[\mathbf v]_{\mathcal B}$. Now you’ve got the input in the form that $F$ expects, but it still produces coordinates relative to the standard basis, so you also have to convert its output, that is, $$FB[\mathbf v]_{\mathcal B} = [f(\mathbf v)]_{\mathcal E}$$ and so $$[f(\mathbf v)]_{\mathcal B} = B^{-1}[f(\mathbf v)]_{\mathcal E} = B^{-1}FB[\mathbf v]_{\mathcal B}$$ from which $F' = B^{-1}FB$. It looks like you computed $FB$ instead—you converted the input, but forgot to convert the output.
