Eigenvalue and similar matrices if $A$ and $B$ are two $n\times n$ matrices with same eigenvalues such that each eigenvalue has same algebraic and geometric multiplicity. Does $A$ and $B$ are similar?
If $A$ is diagnalizable  then the claim is true. But does it true even when sum of geometric multiplicity is not $n$.
Please give me a hint to start with. If given a counter example, please help me to show they are not similar. Thanks
 A: No, it's famously false. The usual counterexample is $A=\begin{pmatrix}0&1&0&0\\ 0&0&0&0\\ 0&0&0&1\\ 0&0&0&0\end{pmatrix}, B=\begin{pmatrix}0&1&0&0\\ 0&0&1&0\\ 0&0&0&0\\ 0&0&0&0\end{pmatrix}$
for both of which $0$ has algebraic multiplicity $4$ and geometric multiplicity $2$.
The result that holds is that two matrices $A, B\in \overline{\Bbb F}^{n\times n}$, where $\overline{\Bbb F}$ is an algebraically closed field, are similar if and only if, for all $\lambda \in \overline{\Bbb F}$ and for all $m\in\Bbb N$, $\dim\ker (A-\lambda id)^m=\dim\ker(B-\lambda id)^m$. This condition trivializes to yours as soon as $n\le 3$.
If $A,B\in \Bbb F^{n\times n}$ and $\Bbb F$ isn't algebraically closed, then the same result holds, in the sense that they are similar if and only if they are similar as matrices in $\overline{\Bbb F}^{n\times n}$ or, equivalently, if and only if $\dim\ker p(A)^m=\dim\ker p(B)^m$ for all $m\in\Bbb N$ and for all irreducible polynomials $p\in\Bbb F[x]$.
A: [Begin Edit]
My initial answer was incorrect, but I believe it is interesting to explain how and why it is incorrect and provide some comments elaborating upon the correct answers posted here (I have left my initial incorrect answer unedited below).
The Jordan normal form classifies all matrices up to similarity transformations. It shows that matrices have a two step decomposition. The first step consists of the eigenvalues themselves, and the second step consists of the Jordan blocks corresponding to a given eigenvalue.
For the question under consideration here (how much information is revealed by knowing the algebraic and geometric multiplicities), distinct eigenvalues may be treated separately from one another and thus the first step in the decomposition is not essential to the question. Thus, one may focus on a single eigenvalue, and furthermore shift the eigenvalue to $0$. This leads to considering nilpotent matrices. A matrix is nilpotent if its characteristic polynomial is $x^n$, which in particular implies that it is an $n\times n$ matrix.
Any such matrix has eigenvalue $0$ with algebraic multiplicity $n$. Moreover, the eigenspace of $0$ coincides with the kernel of the matrix, from which one can see that the eigenspace is equal to the direct sum of the kernels of the Jordan blocks. In particular, the geometric multiplicity (=dimension of eigenspace) is equal to the number of Jordan blocks, since each has a kernel of dimension $1$.
Thus we see there are two cases where knowing the algebraic and geometric multiplicity is sufficient to reconstruct the matrix up to similarity: either when the algebraic and geometric multiplicities coincide (equivalent to diagonalizability), or when the geometric multiplicity is $1$.
[End Edit]

Yes, the knowledge of all the algebraic and geometric multiplicities of all eigenvalues of a matrix is sufficient to determine the matrix up to similarity transformations. This follows (and is equivalent to the existence of) the Jordan normal form.
A: counter example:
$$\begin{bmatrix}
-1 & 1 & 0 & 0 \\
0 & -1 & 0 & 0 \\
0 & 0 & -1 & 1 \\
0 & 0 & 0 & -1
\end{bmatrix}$$
$$\begin{bmatrix}
-1 & 1 & 0 & 0\\
0 & -1 & 1 & 0\\
0 & 0 & -1 & 0\\
0 & 0 & 0 & -1\\
\end{bmatrix}$$
these two matrices have the same eigen values and same geometric multiplicity and are not similar. The geometric multiplicity of the eigen value only tells you the number of blocks in the Jordan Normal form, the size of the largest block for each eigenvalue is the first exponent $k$ such that $\dim[N(A-\lambda I)^k]=m$ where $m$ is the algebraic multiplicity of the corresponding eigenvalue $\lambda$
