give an example of a linear transformation where and are the eigenvalues.
Is this correct?
Yes, that's exactly right! Any linear transformation that satifies " " is a "projection" onto some subspace. Here, you chose to project onto the x-axis.
Any one dimensional subspace of is a line through the origin, (x, y)= (x, ax) for some number a (or the y-axis, (0, y)). It's not easy but you might try to find the projection that maps onto that line.