Minpoly and Charpoly of block diagonal matrix I am currently struggling with an exercise where I have to treat a Block diagonal matrix (so it is a square matrix, where square block matrices are down the diagonal). Now I was wondering whether we can say something about the characteristic or minimal polynomial of the whole matrix, if we know the characteristic and minimal polynomial of the blocks? Anything you know could be helpful!
 A: The characteristic polynomial of the block matrix $A$ is just the product of the characteristic polynomials of the blocks, just remember that the determinant of a block diagonal matrix is the product of the determinants of the blocks, and apply this to the block diagonal matrix $x I - A$.
The minimal polynomial is slightly subtler, as it is the $\operatorname{lcm}$ of the minimal polynomials of the blocks.
To prove this, notice first that the minimal polynomial $m(x)$ of $A$ vanishes when computed on each block, so the minimal polynomial $m_i(x)$ of the $i$-th block divides $m(x)$. So $\operatorname{lcm}(m_i(x))$ divides $m(x)$, but it's easy to see that $\operatorname{lcm}(m_i(x))$ annihilates each block, so $\operatorname{lcm}(m_i(x)) = m(x)$.

Thanks to @Lipschitz for the correction in the comment below.
A: There is little I can add to the complete answer by Andreas Caranti, so let me cheat by answering to a more general question: what can one say if apart from the diagonal blocks there are nonzero entries, but only in the other blocks above the diagonal (this is called a block upper triangular matrix)?
For the characteristic polynomial the answer remains the same: it is the product of the characteristic polynomials of the diagonal blocks, and the other entries above the diagonal have no effect on the characteristic polynomial at all. This is because the corresponding statement holds for the determinant of a block upper triangular matrix, and the contributions from $xI$ in $\det(xI-A)$ are of course all on the diagonal.
For the minimal polynomial the situation is not that simple however: the least common multiple of the minimal polynomials of the diagonal blocks may not annihilate the whole matrix, although it will of course annihilate the diagonal blocks. The simplest situation where you can see this at work is when the diagonal blocks are all identical $1\times1$ blocks say$~(\lambda)$; then their minimal polynomials are all $X-\lambda$, which is also their $\def\lcm{\operatorname{lcm}}\lcm$, but the minimal polynomial of the whole matrix can be any nonzero power of $X-\lambda$ up to $(X-\lambda)^n$ which is (always) the characteristic polynomial, as appropriate combinations of Jordan blocks for$~\lambda$ show. If the minimal polynomials have (many) common factors as in this example, it is hard to describe exactly which power of the common factors will occur in the minimal polynomial of the whole matrix; this depends in a rather complicated way on the entries above the diagonals block that are added. The only positive thing I would think is true is that such entries have no effect on the minimal polynomial in special the case where the two diagonal blocks to their left and below have relatively prime minimal polynomials.
Added. That last sentence is wrong; I shouldn't write what I think but what I can prove. Indeed in
$$
  A=\begin{pmatrix} 0&a&0\\0&1&b\\0&0&0\end{pmatrix}
$$
the entries $a,b$ satisfy the condition, but when both are nonzero they make the minimal polynomial $X^2(X-1)$ instead of $X(X-1)$. What is true (and can be proved by induction) is the fairly weak statement that the product of the minimal polynomials of the diagonal blocks is assured to annihilate the matrix. This means in particular that if those minimal polynomials are pairwise relatively prime, then their $\lcm$ (which is also their product) will be the minimal polynomial of the whole matrix. Of course in the common case that for each diagonal block its minimal and characteristic polynomial coincide, this does not tell us any more than the well known fact that the characteristic polynomial of the whole matrix annihilates it.
