I am following Gilbert Strang's Linear Algebra course (18.06, link). In lecture 30 on "Linear transformations and their matrices", he mentions that the eigenvector basis leads to a diagonal transformation matrix $\Lambda$, using the example of a projection matrix.
I am not able to understand this statement. To determine the transformation matrix $A$, we need to determine first what the input and output bases are. But if we have already chosen the bases, then how can we choose the bases that are the eigenvectors of $A$? I am thinking of it like the chicken and the egg problem.
Suppose I want a diagonal transformation matrix $\Lambda$. For determining $\Lambda$, we need the bases, but for determining the bases, we need the matrix $\Lambda$ because we have to compute its eigenvectors.
Can someone please help me to understand what I am not understanding correctly here?