# How does SageMath compute the Jordan form of a block diagonal matrix? [closed]

Let $M$ be a block diagonal matrix $diag(B_1, \dots, B_m)$. Let $(p_i)$ be the orthogonal projections such that $B_i = p_i M p_i$. If you compute the Jordan form of $M$ using SageMath as follows:

```
sage: jf, q = M.jordan_form(transformation=True)
```

**Question**: Is it true that $q$ commutes with $p_i$ for all $i$?

It would be true if SageMath computes the Jordan form of $M$ by computing the Jordan form of each $B_i$.