Uniquess of a matrix in terms of eigenvalues and eigenspaces. This question is going to sound weird but I really cannot get my head around it.
Suppose an unknown matrix has known eigenvalues and known eigenspaces.
Then, is the matrix necessarily unique?
I mean, if $A$ is 3X3 unknown matrix and there are three distinct eigenvalues and eigenspaces, then we can find the matrix by the usual analysis $PDP^{-1}$. Is this matrix necessarily unique?
 A: For an $n \times n$ matrix with $n$ distinct eigenvalues, yes.  Of course I'm assuming  that "known" includes knowing which eigenspace goes with which eigenvalue.
If there are fewer than $n$ distinct eigenvalues, and the eigenspaces don't span the whole space, it might not be unique.  Thus both
$\pmatrix{0 & 1\cr 0 & 0\cr}$ and $\pmatrix{0 & 2\cr 0 & 0\cr}$ have the same eigenvalues ($0$) and eigenspaces (span of $\pmatrix{1\cr 0}$).
A: In this context it is a bit easier to think about linear transformations (i.e. maps from a vector space to itself) than about matrices, even if for each linear transformation there is a unique matrix and vice versa (after we fix a basis of our vector space).
The reason that the linear transformation perspective is easier here is that we have a clear way of describing for a linear transformation what it means to be unique: if for every vector in the vector space we know where it is mapped, then apparently our knowledge uniquely determines the transformation. If there are some elements of which we have no idea where the transformation maps them, then there might be multiple options, or even none.
Now for your question. The answer is:

If the eigenspaces together span the space (equivalently: if the total space is the direct sum of the eigenspaces), then the linear transformation is uniquely determined by these eigenspaces and corresponding eigenvalues and otherwise not.

Proof:
Let the eigenspaces be $E_1, E_2, \ldots E_k$ and the corresponding eigenvalues be $\lambda_1, \ldots, \lambda_k$. Let $V$ be the space on which the transformation acts and let $T \colon V \to V$ be the name of the transformation.

*

*When indeed $V = E_1 \oplus \ldots \oplus E_k$ then every vector $v \in V$ can be decomposed as $v = v_1 + \ldots + v_k$ with $v_i \in V_i$ and it is easy to see that $Tv = \lambda_1 v_1 + \ldots + \lambda_k v_k$ and so we know what $Tv$ is and hence $T$ is determined uniquely.


*When $E_1 \oplus \ldots \oplus E_k$ is strictly smaller than $V$ then we can pick $v \in V$ outside this space and we have no information whatsoever about what $Tv$ is, so $T$ is not determined uniquely. This happens for instance when the Jordan form of $T$ has non-trivial blocks.
