# Transformation matrix with respect to an orthonormal basis

I have this question here...

Let $$V$$ be the span of $$v_{1}=(0,1,2)$$, $$v_{2}=(-1,0,1)$$ and $$v_{3}=(-1,1,3)$$.

$$(a)$$Construct an orthonormal basis $$B'$$ for $$V$$ (usual dot product).

$$(b)$$ Express each of $$v_1$$,$$v_2$$,$$v_3$$ in terms of the basis $$B'$$ found in $$(a)$$.

$$(c)$$ For any $$x$$ in $$\mathbb{R^3}$$, let $$T(x)=(x \cdot v_1)v_1+(x \cdot v_2)v_2$$ and let $$B=$$ be the standard basis for $$\mathbb{R^3}$$. Construct $$[T]_{B'B}$$, the matrix representation of $$T$$ with respect to the two basis $$B,B'$$.

$$(d)$$ If $$x=(1,1,1)$$, find the coordinates of $$T(x)$$ with respect to the basis $$B'$$.

I already figured out parts $$(a)$$ and $$(b)$$.

In part $$(a)$$, I just need to use the gram schmidt procedure. Since $$v_{3}$$ is linearly dependent, that cannot be part of the orthonormal basis $$B'$$ and hence I just need to use the gram schmidt procedure on $$v_1$$ and $$v_2$$.

Thus, using the gram schmidt prodedure, I obtain:

$$U_{1}=V_{1}=(0,1,2)$$

Orthonormalizing, we obtain $$v_{1}'=(0,\frac{1}{\sqrt{5}},\frac{2}{\sqrt{5}})$$

Then $$U_2=V_2-\frac{V_2 \cdot U_1}{||U_1||^2}U_1$$

Doing so gives: $$U_2=(-1,\frac{-2}{5},\frac{1}{5})$$

Orthonormalizing, we get $$v_{2}'=(\frac{-5}{\sqrt{30}},\frac{-2}{\sqrt{30}},\frac{1}{\sqrt{30}})$$

$$B'=\left\{\begin{array}{@{}c@{}}\left(\begin{matrix}0 \\ \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \end{matrix}\right),\left(\begin{matrix} \frac{-5}{\sqrt{30}} \\ \frac{-2}{\sqrt{30}} \\ \frac{1}{\sqrt{30}} \end{matrix}\right)\end{array} \right\}$$

Where $$v_1'=\left(\begin{matrix}0 \\ \frac{1}{\sqrt{5}} \\ \frac{2}{\sqrt{5}} \end{matrix}\right)$$ and $$v_2'= \left(\begin{matrix} \frac{-5}{\sqrt{30}} \\ \frac{-2}{\sqrt{30}} \\ \frac{1}{\sqrt{30}} \end{matrix}\right)$$

In part $$(b)$$, I just need to express $$v_1$$ , $$v_2$$ and $$v_3$$ as a linear combination of $$B'$$, so in essence:

$$v_1=av_1'+bv_2'$$

$$v_2=av_1'+bv_2'$$

$$v_3=av_1'+bv_2'$$

If I solve with row reduction, I obtain that:

$$v_1=\sqrt{5}v_1'+0v_2'$$

$$v_2=\frac{2}{\sqrt{5}}v_1'+\frac{6}{\sqrt{30}}v_2'$$

$$v_3=\frac{7}{\sqrt{5}}v_1'+\frac{6}{\sqrt{30}}v_2'$$

Can anyone help on parts $$(c)$$ and $$(d)$$ though?

In part (c) I think it's asking for the compostition of the transformation matrix, namely $$[T]_{b} [T]_{b'}$$ but I am not even sure how to compute that.

I'm pretty sure I have to use a change of basis matrix in part $$(d)$$ but I am not sure.

Any help would be much appreciated! This isn't for marks or anything by the way. I'm just reviewing linear algebra after 6 years because I didn't understand it that well so I wanted to make sure I have a good grasp on this now.

## 2 Answers

Since the notation is sometimes different: In the following I assume $$T_{B',B}$$ takes a vector in its representation w.r.t. $$B$$ and evaluates $$T$$ and gives back a vector in representation w.r.t. $$B'$$. (Sometimes the order of $$B$$ and $$B'$$ is different.)

The idea in (c) is to change basis from $$B$$ to $$B'$$ and evaluate T after that. Try to calculate the matrix $$T_{B',B'}$$ first. After that you can calculate the base change matrix $$M_{B',B}$$, changing the representation of $$x$$ w.r.t. $$B$$ into the representation of $$x$$ w.r.t. $$B'$$. Then the answer is the product of these matrices (Which one do you have to multiply with $$x$$ first? So which order is the right one?).

For (d) you just need to evaluate T on (1,1,1), i. e. multiply the matrix in (c) from right with (1,1,1).

We can dispense with part (d) immediately: it’s just the result of multiplying $$(1,1,1)^T$$ by the matrix from part (c). For that, let’s back up a bit and solve part (b) a little differently.

The coordinates of a vector are signed ratios of the lengths of its projections onto the basis vectors to the lengths of the basis vectors. When you have an orthogonal basis, those projections are all orthogonal and moreover when the basis is orthonormal, then a vector’s coordinates are just its inner products with the basis vectors. Now, when you left-multiply a column vector by a matrix, the result consists of the dot products of the vector with each row of the matrix (recall the basic definition of matrix multiplication). Combining these two observations, we see that we can compute the $$B'$$-coordinates of a vector from its coordinates relative to the standard basis by multiplying it by $$\begin{bmatrix}v_1'&v_2'\end{bmatrix}^T = B'^T$$.

So, one approach to part (c) is to compute the matrix of $$T$$ relative to the standard basis and then left-multiply it by $$B'^T$$. To find the standard matrix of $$T$$, observe that the formula for this transformation looks a lot like the formula for an orthogonal projection. We can rewrite it in a similar way to the one that’s used to factor a matrix out of the projection formula: $$(x\cdot v_1)v_1 + (x\cdot v_2)v_2 = (v_1^Tx)v_1+(v_2^Tx)v_2 = (v_1v_1^T)x+(v_2v_2^T)x = (v_1v_1^T+v_2v_2^T)x.$$