Apologies if this has already been asked - I searched but couldn't find.
My question is regarding matrix similarity (equivalence): I have a square matrix $A$ that is of permutation form and (square) $B$ that is block diagonal form: I know both of these.
I'm looking for a similarity matrix $Q$ such that $B = Q^{-1}AQ$ but I need a specific $Q$ as the change of basis needs to be a particular form.
I already know some things about $Q$ such as the first column and row are all 1's and that the matrix is fully populated with $1$ and $-1$ (i.e. no non-zero values). I also believe that when each column is summed, that all sums will be zero except the first column which is all 1's and so sums to the dimension of $Q$.
My matrices $A$ and $B$ are $24 \times 24$, as I'm working with representations of the rotation group of a cube. The $Q$ I'm looking for definitely exists, but I'm just unsure about how to find it!
I managed to calculate (hack together) such a similarity matrix for $A$ and $B$ being $8\times8$ (a different symmetry group) and ended up with the property $Q'Q = (1/8)I_8$ - is the case for all $Q$?
I'm pretty new to this area of linear algebra so I apologise if this question is trivial or if it's not well-explained. If anyone could provide any advice on this, it would be very much appreciated.
Thanks!