# the property of two matrices to be commutative is not transitive

it is known that a square matrix A may commute with B, and that the same matrix A may commute with C, but B and C do not commute. This is true only if all the matrices are derogatory, see for example:

https://en.wikipedia.org/wiki/Commuting_matrices

My question is the following: which may be a procedure to generate the matrices A, B, and C which are so non-diagonalisables and have the shown property ? If some body may give me some tips or indicate a bibliographical reference, it will be fine.

Thanks in advance

• this is true if the matrices are derogatory? what does that mean? why do you want the matrices to be non-diagonalisable? – thedude Feb 5 '18 at 15:53
• this means that in the case of diagonalisables matrices, such a procedure is well known... but this is not an answer to my question. Thank you – d.zaharia Feb 5 '18 at 16:34
• sorry, big mistake in the previous assertion... it means that for diagonalisables matrices, the commutative property is also transitive, so for these matrices if A commutes with B and A commutes with C, than B will commute with C... so for this reason I adress this particular case – d.zaharia Feb 5 '18 at 17:04
• no, commutativity is not transitive for diagonalisable matrices. Just take two noncommuting matrices and notice that both commute with the identity – thedude Feb 5 '18 at 17:05