# Linear map/transformation - linear alg

I have two questions that I don't really understand what it's asking for. Can someone help me get started please?

1. Find a linear map from P4 to P4 (where P4 is the space of polynomials of degree less than 4) whose kernel is one-dimensional. Find one whose kernel is two-dimensional.

what im thinking is:
if it is a map in P4, then it looks like
$$\left|\begin{array}{ccc}1 \\ x\\ x^2\\x^3\end{array}\right|$$
?? not sure where to go from there.

2. Find the matrix representation in the standard basis of the linear transformation from P4 to P3:
f(x) -> 2f(x) - f(x-1) - f(x+1).
What is the dimension of its kernel? Of its image?

absolutely no idea where to begin

Related Calculus and Beyond Homework Help News on Phys.org
jbunniii
Homework Helper
Gold Member
I have two questions that I don't really understand what it's asking for. Can someone help me get started please?

1. Find a linear map from P4 to P4 (where P4 is the space of polynomials of degree less than 4) whose kernel is one-dimensional. Find one whose kernel is two-dimensional.

what im thinking is:
if it is a map in P4, then it looks like
$$\left|\begin{array}{ccc}1 \\ x\\ x^2\\x^3\end{array}\right|$$
?? not sure where to go from there.
It maps from P4 to P4. What is the dimension of P4? Let's call it N. Then any matrix corresponding to this map should be NxN. You have written an 4x1 matrix, so that can't be right.

By the way, you don't need matrices to do this problem, and it might simply confuse things.

If we call the map T, and write a general input polynomial as

$$a_n x^n + a_{n-1} x^{n-1} + \ldots + a_1 x + a_0$$

then what does the output polynomial look like? (Just apply T to this input.) Then, for the kernel to have dimension exactly equal to one, what must be true?

2. Find the matrix representation in the standard basis of the linear transformation from P4 to P3:
f(x) -> 2f(x) - f(x-1) - f(x+1).
What is the dimension of its kernel? Of its image?

absolutely no idea where to begin
First, let's check some basic things: can you explain why this map is linear? Can you explain why it maps P4 to P3? Hint: start by writing a general element of P4, similar to what I did above for P4. Then apply the map to it. Once you have done this, the next step is to identify exactly: what is its kernel? What is its image?

You say apply the map to it for both, but I don't quite understand what that means exactly. This is my thought process so far.

It maps from P4 to P4. What is the dimension of P4? Let's call it N. Then any matrix corresponding to this map should be NxN. You have written an 4x1 matrix, so that can't be right.

By the way, you don't need matrices to do this problem, and it might simply confuse things.

If we call the map T, and write a general input polynomial as

$$a_n x^n + a_{n-1} x^{n-1} + \ldots + a_1 x + a_0$$

$$\left|\begin{array}{cccc}1 & 1&1&1 \\ x&x&x&x\\ x^2&x^2&x^2&x^2\\x^3&x^3&x^3&x^3\end{array}\right|$$

then what does the output polynomial look like? (Just apply T to this input.) Then, for the kernel to have dimension exactly equal to one, what must be true?
$$a_3 x^3 + a_2 x^2 + a_1 x + a_0$$

Is T what you are multiplying by to get the result?
So for a one-dimensional kernel..
$$\left|\begin{array}{c}1 \\ 0\\ 0\\0\end{array}\right|$$
and for two-dim:
$$\left|\begin{array}{c}1 \\1\\ 0\\0\end{array}\right|$$
I'm just trying to picture it in a way I can understand.

First, let's check some basic things: can you explain why this map is linear? Can you explain why it maps P4 to P3? Hint: start by writing a general element of P4, similar to what I did above for P4. Then apply the map to it. Once you have done this, the next step is to identify exactly: what is its kernel? What is its image?
So it is a 4 x 4 matrix mapping to a 3 x 3 matrix? I'm guessing the map I am supposed to apply is 2f(x) - f(x-1) - f(x+1)?

jbunniii
Homework Helper
Gold Member
OK, let's start by understanding P4.

P4 is the set of all polynomials of degree <= 4. Therefore a general element (polynomial) of P4 looks like

$$p(x) = a_4 x^4 + a_3 x^3 + a_2 x^2 + a_1 x + a_0$$

Note that $$\{1, x, x^2, x^3, x^4\}$$ is a basis for P4, and it takes exactly five coefficients, $$a_0$$ through $$a_4$$ to specify a given element.

This means that P4 is a five-dimensional vector space.

Now, a given linear map from P4 to P4 (call it T) must because of its linearity obey the following:

$$T(p(x)) = a_4 T(x^4) + a_3 T(x^3) + a_2 T(x^2) + a_1 T(x) + a_0 T(1)$$

Therefore T is completely defined by how it maps just five vectors, $$\{1, x, x^2, x^3, x^4\}$$. (This amounts to choosing the columns of the matrix of T with respect to this basis.)

Now, what has to be true of the set

$$\{T(x^4), T(x^3), T(x^2), T(x^1), T(1)\}$$

if the null space of T has dimension 0? What if it has dimension 1? What if it has dimension 2?

Now, what has to be true of the set

$$\{T(x^4), T(x^3), T(x^2), T(x^1), T(1)\}$$

if the null space of T has dimension 0? What if it has dimension 1? What if it has dimension 2?
So T is also a vector? in this case a 1 x 5 matrix. so:

T = {0, 0, 0, 0, 0} for dimension of 0

T = {0, 0, 0, 0, a} for dimension of 1

T = {0, 0, 0, b, a} for dimension of 2

jbunniii
Homework Helper
Gold Member
So T is also a vector? in this case a 1 x 5 matrix. so:

T = {0, 0, 0, 0, 0} for dimension of 0

T = {0, 0, 0, 0, a} for dimension of 1

T = {0, 0, 0, b, a} for dimension of 2
No, T maps from a five-dimensional vector space to a five-dimensional vector space. That determines the size of its matrix with respect to any choice of basis.

If you had a matrix that mapped R^5 to R^5, what would the size of that matrix be?

it would be a 5 x 5 matrix.

jbunniii
Homework Helper
Gold Member
it would be a 5 x 5 matrix.
OK, now do you know how to write down an example of a 5 x 5 matrix that happens to have exactly 4 linearly independent columns?

If you had such a matrix M, what would the following dimensions be?

dim(null(M))
dim(range(M))

OK, now do you know how to write down an example of a 5 x 5 matrix that happens to have exactly 4 linearly independent columns?

If you had such a matrix M, what would the following dimensions be?

dim(null(M))
dim(range(M))
$$\left|\begin{array}{ccccc}1&1&1&1&1 \\ 2&3&1&3&2\\1&1&1&3&1\\1&4&1&4&1\\5&5&5&5&5\end{array}\right|$$

thats an example. the first four are linearly independent and the first and last are dependent. were you asking for a more generic answer though? like with variables?

as for dim(null M) and dim(range M)
null = kernel

I would put it in reduced row echelon form and circle the columns with pivots. The columns that are circled make the dim of the range and the columns that arent circle form the dim of the null. I believe thats right.

jbunniii
Homework Helper
Gold Member
$$\left|\begin{array}{ccccc}1&1&1&1&1 \\ 2&3&1&3&2\\1&1&1&3&1\\1&4&1&4&1\\5&5&5&5&5\end{array}\right|$$

thats an example. the first four are linearly independent and the first and last are dependent. were you asking for a more generic answer though? like with variables?
No, a specific concrete example is great - you can actually use this to answer the problem, but first you'll have to understand how:

as for dim(null M) and dim(range M)
null = kernel
Yes, those two terms mean the same thing.

I would put it in reduced row echelon form and circle the columns with pivots. The columns that are circled make the dim of the range and the columns that arent circle form the dim of the null. I believe thats right.
No, I asked you to construct a 5x5 matrix that had exactly four linearly independent columns for a reason. The reason is that knowing this fact alone is enough to answer "what are dim(null(M)) and dim(range(M))".

Let's start with dim(range(M)). This is simply the dimension of the subspace spanned by the columns of M. If M has exactly four linearly independent columns, then what is dim(range(M))?

Then, the other important fact you need is this VERY FUNDAMENTAL rule:

dim(null(M)) + dim(range(M)) = D

where D is the dimension of the target space (the space that M maps to). If you don't know this rule, you need to scour back through your notes and find it! It's one of the key facts of linear algebra.

If the size of M is m x n, then what is D? (Hint: it's either m or n. Which one, and why?)

Once you have answered these questions, then you will know dim(range(M)) and D, which will allow you to solve for dim(null(M)). It will turn out in this case that dim(null(M)) is the the right number for one of the two problems you were asked to solve (i.e., either 1 or 2). (Which one?)

And you will be able to use the matrix you constructed to provide the example that the problem asked for.

Let's start with dim(range(M)). This is simply the dimension of the subspace spanned by the columns of M. If M has exactly four linearly independent columns, then what is dim(range(M))?
dim(range(M)) = 4 since it spans R^4.

Then, the other important fact you need is this VERY FUNDAMENTAL rule:

dim(null(M)) + dim(range(M)) = D

where D is the dimension of the target space (the space that M maps to). If you don't know this rule, you need to scour back through your notes and find it! It's one of the key facts of linear algebra.
Thus, dim(null(M)) = 1
D = 5

If the size of M is m x n, then what is D? (Hint: it's either m or n. Which one, and why?)
D = n. The number of columns, since the range and null have to add up to the number of columns.

Once you have answered these questions, then you will know dim(range(M)) and D, which will allow you to solve for dim(null(M)). It will turn out in this case that dim(null(M)) is the the right number for one of the two problems you were asked to solve (i.e., either 1 or 2). (Which one?)
It would be for one-dimension?

And you will be able to use the matrix you constructed to provide the example that the problem asked for.

jbunniii
Homework Helper
Gold Member
dim(range(M)) = 4 since it spans R^4.
dim(range(M)) = 4 because M spans a 4-dimensional SUBSPACE of R^5. (Not the same as spanning R^4.)

Thus, dim(null(M)) = 1
D = 5
Correct.

D = n. The number of columns, since the range and null have to add up to the number of columns.
D is the number of rows, i.e., if M maps from an m-dimensional space to an n-dimensional space, then dim(range(M)) + dim(null(M)) = m, it does not equal n. In your case both m and n are 5.

OK, so now you know dim(null(M)) = 1. This is good, because it the problem asked for an example where dim(null(M)).

So now how do you express your answer? You've already written down the matrix, so you can express the answer one of (at least) two ways:

(1) "Let T be the linear map from P4 to P4, whose matrix in terms of the basis $$\{x^4,x^3,x^2,x,1\}$$ is:" [insert your matrix here].

OR

(2) "$$\{x^4,x^3,x^2,x,1\}$$ is a basis for P4, and it suffices to specify T on this basis, so I choose to do so as follows:

$$T(x^4) = 1 x^4 + 2 x^3 + 1 x^2 + 1 x + 5$$ (I used the first column vector for the coefficients)

$$T(x^3) =$$ (linear combination using the second column vector)

etc.

Note that (1) and (2) are exactly equivalent. (You should convince yourself of this! This is exactly what a matrix representation MEANS.) Which way you choose to express it is really up to you.

In either case, explain as you did above why the null space of T has dimension 1.

Last edited:
ok. and likewise for one whose kernel is two-dimensional would simply be a 5 x 5 matrix with 3 linearly independent columns. its all slowly starting to make sense.

as for the other question:
2. Find the matrix representation in the standard basis of the linear transformation from P4 to P3:
f(x) --> 2f(x) - f(x-1) - f(x+1).
What is the dimension of its kernel? Of its image?

it is mapping a 5 dimensional vector space to a 4 dimensional vector space. so it would still be a 5 x 5 matrix but 4 dimensional?
so something like:
$$\left|\begin{array}{ccccc}1&1&1&1&1 \\ 2&3&1&3&3\\1&1&1&3&1\\1&4&1&4&1\\0&0&0&0&0\end{arr ay}\right|$$

jbunniii
Homework Helper
Gold Member
ok. and likewise for one whose kernel is two-dimensional would simply be a 5 x 5 matrix with 3 linearly independent columns. its all slowly starting to make sense.
Yes, exactly.

as for the other question:
2. Find the matrix representation in the standard basis of the linear transformation from P4 to P3:
f(x) --> 2f(x) - f(x-1) - f(x+1).
What is the dimension of its kernel? Of its image?

it is mapping a 5 dimensional vector space to a 4 dimensional vector space. so it would still be a 5 x 5 matrix but 4 dimensional?
so something like:
$$\left|\begin{array}{ccccc}1&1&1&1&1 \\ 2&3&1&3&3\\1&1&1&3&1\\1&4&1&4&1\\0&0&0&0&0\end{arr ay}\right|$$
No, if it's mapping from a 5-dimensional space to a 4-dimensional space, that means the input vectors have 5 elements and the output vectors have 4 elements. That forces the matrix to be 5x4. Now your job is to find the elements of that matrix, assuming the standard basis for polynomials. The standard basis for P4 is $$x^4,x^3,x^2,x^1,1$$ and for P3 is $$x^3,x^2,x^1,1$$.

You need to use the given definition of the linear map in order to find the matrix. Hint: you can do this by "feeding" each element of the basis for P4, one at a time, to the map, and looking at the result. The result will be a linear combination of the elements of the basis for P3. The coefficients of the linear combination are precisely the number that go into the matrix columns.

i've been searching through the book trying to find something on linear transformations similar to this but couldn't find anything. i have no idea what to do with f(x) --> 2f(x) - f(x-1) - f(x+1).

are you saying to like plug each element of $$x^4,x^3,x^2,x^1,1$$ one by one into the map like:
$$2(x^4) - (x^4-1) - (x^4+1)$$
that doesn't seem right at all.

jbunniii
Homework Helper
Gold Member
i've been searching through the book trying to find something on linear transformations similar to this but couldn't find anything. i have no idea what to do with f(x) --> 2f(x) - f(x-1) - f(x+1).

are you saying to like plug each element of $$x^4,x^3,x^2,x^1,1$$ one by one into the map like:
$$2(x^4) - (x^4-1) - (x^4+1)$$
that doesn't seem right at all.
Let's give the map a name - let's call it $$T$$, defined by:

$$T(f(x)) = 2f(x) - f(x-1) - f(x+1)$$

where $$f(x)$$ is a polynomial in $$P^4$$.

For example, choose $$f(x) = x^4$$.

I'll construct $$T(x^4)$$ one piece at a time:

\begin{align*} 2f(x) &= 2x^4 \\ f(x-1) &= (x-1)^4 = x^4 - 4x^3 + 6x^2 - 4x + 1 \\ f(x+1) &= (x+1)^4 = x^4 + 4x^3 + 6x^2 + 4x + 1 \end{align*}

Then

\begin{align*}T(x^4) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^4 - (x^4 - 4x^3 + 6x^2 - 4x + 1) - (x^4 + 4x^3 + 6x^2 + 4x + 1) \\ &= 8x^3 -12x^2 + 8x - 2 \end{align*}

Now you can see the coefficients which should go into the column corresponding to $$T(x^4)$$. Repeat the process for the other basis elements and that gives you a matrix. You can use the matrix to answer the questions about the dimensions of the kernel and the image.

\begin{align*}T(x^4) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^4 - (x^4 - 4x^3 + 6x^2 - 4x + 1) - (x^4 + 4x^3 + 6x^2 + 4x + 1) \\ &= 8x^3 -12x^2 + 8x - 2 \end{align*}

\begin{align*}T(x^3) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^3 - (x^3 - 3x^2 + 3x - 1) - (x^3 + 3x^2 + 3x + 1) \\ &= -6x \end{align*}

\begin{align*}T(x^2) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^2 - (x^2 - 2x + 1) - (x^2 + 2x + 1) \\ &=2x-2 \end{align*}

\begin{align*}T(x) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x - (x - 1) - (x + 1) \\ &= 0 \end{align*}

\begin{align*}T(1) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2 - (1) - (1) \\ &= 0 \end{align*}

$$\left|\begin{array}{c}1 \\ x\\ x^2\\x^3\\x^4\end{array}\right|$$

so the matrix i came up with is:
$$\left|\begin{array}{cccc}-2 & 0 & -2 & 0 \\ 8 & -6 & 2 & 0\\ -12 & 0 & 0 & 0\\8 & 0 & 0 & 0\\0&0&0&0\end{array}\right|$$

so the dim(ker(A)) = 2. and the dim(image(A)) = ?? is image same as range? therefore it equals 3

Last edited:
jbunniii
Homework Helper
Gold Member
\begin{align*}T(x^4) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^4 - (x^4 - 4x^3 + 6x^2 - 4x + 1) - (x^4 + 4x^3 + 6x^2 + 4x + 1) \\ &= 8x^3 -12x^2 + 8x - 2 \end{align*}

\begin{align*}T(x^3) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^3 - (x^3 - 3x^2 + 3x - 1) - (x^3 + 3x^2 + 3x + 1) \\ &= -6x \end{align*}

\begin{align*}T(x^2) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^2 - (x^2 - 2x + 1) - (x^2 + 2x + 1) \\ &=2x-2 \end{align*}

\begin{align*}T(x) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x - (x - 1) - (x + 1) \\ &= 0 \end{align*}

\begin{align*}T(1) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2 - (1) - (1) \\ &= 0 \end{align*}

$$\left|\begin{array}{c}1 \\ x\\ x^2\\x^3\\x^4\end{array}\right|$$

so the matrix i came up with is:
$$\left|\begin{array}{cccc}-2 & 0 & -2 & 0 \\ 8 & -6 & 2 & 0\\ -12 & 0 & 0 & 0\\8 & 0 & 0 & 0\\0&0&0&0\end{array}\right|$$

so the dim(ker(A)) = 2. and the dim(image(A)) = ?? is image same as range? therefore it equals 3
I think you made an algebra error when computing $$T(x^2)$$, but I don't think it affects the rest of the answer.

The dimension of the image is the number of linearly independent columns. The dimension of the kernel can be obtained from

dim(ker(A)) + dim(image(A)) = dim V

where V is the input vector space.

\begin{align*}T(x^2) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^2 - (x^2 - 2x + 1) - (x^2 + 2x + 1) \\ &=-2 \end{align*}
$$\left|\begin{array}{cccc}-2 & 0 & -2 & 0 \\ 8 & -6 & 0 & 0\\ -12 & 0 & 0 & 0\\8 & 0 & 0 & 0\\0&0&0&0\end{array}\right|$$

dim(image(A)) = 4
dim(ker(A)) + dim(image(A)) = dim V
dim V = 5
thus, dim(ker(A)) = 1

jbunniii
Homework Helper
Gold Member
\begin{align*}T(x^2) &= 2f(x) - f(x-1) - f(x+1)\\ &= 2x^2 - (x^2 - 2x + 1) - (x^2 + 2x + 1) \\ &=-2 \end{align*}
$$\left|\begin{array}{cccc}-2 & 0 & -2 & 0 \\ 8 & -6 & 0 & 0\\ -12 & 0 & 0 & 0\\8 & 0 & 0 & 0\\0&0&0&0\end{array}\right|$$

dim(image(A)) = 4
dim(ker(A)) + dim(image(A)) = dim V
dim V = 5
thus, dim(ker(A)) = 1
dim(image(A)) = 4? The matrix has four columns, one of which is all zeros. Can it really have four linearly independent columns? Or if you prefer to look at rows, are rows 3 and 4 linearly independent? What about any set of rows that includes row 5?

dim(image(A)) = 4? The matrix has four columns, one of which is all zeros. Can it really have four linearly independent columns? Or if you prefer to look at rows, are rows 3 and 4 linearly independent? What about any set of rows that includes row 5?
the last column is all zeros, so that is linearly dependent. Rows 3 and 4 are linearly dependent too, as with row 5.

so that leads me back to dim(image(A)) = 3 and dim(ker(A)) = 2, which is what i had before but that was wrong?

jbunniii
Homework Helper
Gold Member
Wait, I just noticed that you have the dimensions of your matrix wrong!

T maps $$P^4$$ to $$P^3$$, correct? So the input vector space has dimension $$dim(P^4)$$ which we've established is 5, and the output vector space has dimension $$dim(P^3)$$, which is 4.

Thus T maps from a 5-dimensional space to a 4-dimensional space. How many rows should T have? How many columns should T have?

Your calculation of all the coefficients was OK, but you put them into a matrix of the wrong size. Fix that and maybe the dimensions of the image and kernel will be clearer.

$$\left|\begin{array}{ccccc}-2&8&-12&8&0\\0&-6&0&0&0\\-2&0&0&0&0\\0&0&0&0&0\end{array}\right|$$

ok. so the dim(ker(A)) = 3 and dim(image(A)) = 2

jbunniii
Homework Helper
Gold Member
$$\left|\begin{array}{ccccc}-2&8&-12&8&0\\0&-6&0&0&0\\-2&0&0&0&0\\0&0&0&0&0\end{array}\right|$$

ok. so the dim(ker(A)) = 3 and dim(image(A)) = 2
I see more than two linearly independent columns (and/or rows)!

just to clear this up. any row/column with all zeros is linearly independent?

in that case, all the rows are linearly independent.

as for the columns, the 3rd and 4th columns are dependent.