My codegolf.stackexchange post Github Repository with experiments I went on an adventure finding NxN matrices AAA and BBB where AB=10A+B AB = 10A + B AB=10A+B. First of all, for a given candidate A, B is fixed: AB=10A+BA=10ABβ1+II=10Bβ1+Aβ1B=10(IβAβ1)β1B=10(I+(AβI)β1) AB = 10A + B\\ A = 10AB^{-1} + I\\ I = 10B^{-1} + A^{-1}\\ B = 10(I - A^{-1})^{-1}\\ B = 10(I + (A - I)^{-1}) AB=10A+BA=10ABβ1+II=10Bβ1+Aβ1B=10(IβAβ1)β1B=10(I+(AβI)β1) One approach is to take the eigendecomposition of A. From before, A=QΞAQβ1B=10(IβAβ1)β1B=10(QIQβ1βQΞAβ1Qβ1)β1B=Q(10(IβΞAβ1))Qβ1 A = Q \Lambda_A Q^{-1}\\ B = 10(I - A^{-1})^{-1}\\ B = 10(Q I Q^{-1} - Q \Lambda_A^{-1} Q^{-1})^{-1}\\ B = Q(\frac{10}{(I - \Lambda_A^{-1})})Q^{-1}\\ A=QΞAβQβ1B=10(IβAβ1)β1B=10(QIQβ1βQΞAβ1βQβ1)β1B=Q((IβΞAβ1β)10β)Qβ1 This shows that A, B share eigenvectors Q, and their eigenvalues are assosciated by ΞAΞB=10ΞA+ΞB \Lambda_A \Lambda_B = 10 \Lambda_A + \Lambda_B\\ ΞAβΞBβ=10ΞAβ+ΞBβ Interestingly, this proves that AB = BA, ie our matrices commute! We can calculate the determinant of B as 10N1Ξ i(1β1Ξ»A,i)10^N \frac{1}{\Pi_i (1 - \frac{1}{\lambda_{A,i}})}10NΞ iβ(1βΞ»A,iβ1β)1β This is very suggestive, but doesn't immediately yield a way to pick a matrix A such that B is small positive integers. Because A and B share eigenvectors, B can be written as a linear combination of (I,A,A2... ANβ1)(I, A, A^2 ... ~ A^{N-1})(I,A,A2... ANβ1). For example, A=(124113111),B=(746364128)A = \left(\begin{array}{rrr}1 & 2 & 4 \\1 & 1 & 3 \\1 & 1 & 1\end{array}\right), B = \left(\begin{array}{rrr}7 & 4 & 6 \\3 & 6 & 4 \\1 & 2 & 8\end{array}\right)A=βββ111β211β431ββ ββ,B=βββ731β462β648ββ ββ ΞA=(β6+20006+2000β1),ΞB=(β6+20006+2000β1)\Lambda_A = \left(\begin{array}{rrr}-\sqrt{6} + 2 & 0 & 0 \\0 & \sqrt{6} + 2 & 0 \\0 & 0 & -1\end{array}\right), \Lambda_B = \left(\begin{array}{rrr}-\sqrt{6} + 2 & 0 & 0 \\0 & \sqrt{6} + 2 & 0 \\0 & 0 & -1\end{array}\right)ΞAβ=ββββ6β+200β06β+20β00β1ββ ββ,ΞBβ=ββββ6β+200β06β+20β00β1ββ ββ We observe that ΞB=ΞA2β2ΞA+2I\Lambda...
First seen: 2026-01-21 15:40
Last seen: 2026-01-21 17:40