What are examples of two non-similar invertible matrices with same minimal and characteristic polynomial and same dimension of each eigenspace?

I'm trying with matrices over $\mathbb F_2$ and trying to have a look at the Jordan canonical forms of these matrices. If the size of the biggest Jordan block is the same with 1's in all diagonal entries, we do get non-similar invertible matrices with same minimal and characteristic polynomial. But what do I do for satisfying the last condition on eigenspace? Please provide examples if possible and also please explain why it works.

• See this answer to the question: $2\times2$ matrices are not big enough. – Marc van Leeuwen Dec 3 '14 at 10:04

Working over $\mathbb{F}_2$ makes this pretty simple. If your matrices are invertible, then $1$ is the only eigenvalue they can have. Any two invertible $n\times n$ matrices in $\mathbb{F}_2$ will have characteristic polynomial $p(x)=(x-1)^n$. By choosing the largest Jordan block to be the same size between the two matrices, we get two matrices with equal minimal polynomial $q(x) = (x-1)^k$, where $k$ is the size of the largest block. Finally, for the two to have eigenspaces of equal dimension, we must have an equal number of Jordan blocks (recall that the number of Jordan blocks corresponding to an eigenvalue $\lambda$ is equal to the geometric multiplicity of $\lambda$).
You can check that the largest Jordan block must be larger than $2\times 2$, or you cannot possibly fulfill the above conditions. Thus at least a $3\times 3$ block is needed. It is also sufficient, since we can have $$\begin{pmatrix} 1 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 1\\ 0 & 0 & 0 & 0 & 0 & 0 & 1\end{pmatrix},\ \begin{pmatrix} 1 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1\end{pmatrix},$$ which are two non-similar invertible matrices with characteristic polynomial $p(x) = (x-1)^7$, minimal polynomial $q(x) = (x-1)^3$ and eigenspaces of dimension $3$.
From my comment to the question I linked to, the following. You are looking for two Jordan types (partitions of a number $n$) such that their Young diagrams have equal size ($n$) as well as equal lengths of its first row and column (the former giving the size of the largest Jordan block, which is a multiplicity in the minimal polynomial, and the latter giving the number of Jordan blocks, which is the dimension of an eigenspace).
It is of course quite possible to have this in general. But one needs, apart from the boxes in the first row and column, two different partitions (of the same remaining number) for the remaining boxes. The smallest case of two different partitions is $(2)\neq(1,1)$. To have those two partitions after chopping off the first row and column, you need to have at least $3$ rows and $3$ columns to begin with. First row and column share a single box, so the minimal number of boxes required for an example is $(3+3−1)+2=7$. Thus one gets an example for $n=7$ (and only one), for Jordan types $(3,3,1)\neq(3,2,2)$.
In summary, take a single eigenvalue ($\lambda=1$ given your restrictions) and concatenate Jordan blocks of sizes $(3,3,1)$ in one matrix, and of sizes $(3,2,2)$ in another. Larger examples are similarly constructed.