# How do you find the matrix relative to a basis?

I'm having trouble knowing where to start. I've been given the problem:

Let $\ B = \{1, x, sin(x), cos(x)\}$ be a basis for a subspace $\ W$ of the space of continuous functions, and let $\ Dx$ be the differential operator on $\ W$.

Find the matrix $\ Dx$ relative to the basis $\ B$.

Do I take the derivative of the basis components and set them equal to the basis?

• You take the derivatives of the members of the basis, and express them in the basis. May 16, 2015 at 19:23

We are given that $\beta=\{1,\sin,\cos\}$ is a basis for $W$ and that $D:W\to W$ is the differential operator. To compute $[D]_\beta$ note that \begin{array}{rcrcrcr} D(1) & = & \color{red}{0}\cdot 1 & + & \color{green}{0}\cdot\sin & + & \color{blue}{0}\cdot \cos \\ D(\sin) & = & \color{red}{0}\cdot 1 & + & \color{green}{0}\cdot\sin & + & \color{blue}{1}\cdot \cos \\ D(\cos) & = & \color{red}{0}\cdot 1 & + & \color{green}{-1}\cdot\sin & + & \color{blue}{0}\cdot \cos \\ \end{array} This implies that $$[D]_\beta= \begin{bmatrix} \color{red}0&\color{red}0&\color{red}0 \\ \color{green}0&\color{green}0&\color{green}{-1}\\ \color{blue}0&\color{blue}1&\color{blue}0 \end{bmatrix}$$