Mathematica Asked on May 19, 2021
I want to find multiple nonzero real matrices A
, B
that satisfy $A.B=mathbf{0}$ condition.
A = Array[a, {3, 3}];
B = Array[b, {3, 3}];
FindInstance[
A.B == ConstantArray[0, {3, 3}] && A != ConstantArray[0, {3, 3}] &&
B != ConstantArray[0, {3, 3}], Flatten[{A, B}], Reals,5]
{{A, B}} /. First[%]
However, the above code can not return the desired results for a long time. What can I do to quickly get multiple sets of matrices that meet the requirements (their elements are preferably rational numbers)?
With that many unknowns I am astonished that this completes in less than HUGE amounts of time.
{{{a,b,c},{d,e,f},{g,h,i}},{{j,k,l},{m,n,o},{p,q,r}}}/.
FindInstance[{{a,b,c},{d,e,f},{g,h,i}}.{{j,k,l},{m,n,o},{p,q,r}}==
{{0,0,0},{0,0,0},{0,0,0}}&&Element[a|b|c|d|e|f|g|h|i|j|k|l|m|n|o|p|q|r,Reals],
{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r},3]
All the results I've seen have rational or integer entries.
It does seem to tend towards solutions with one or more zero rows.
If a zero row is acceptable then replacing a,b,c with 0,0,0 seems to speed it up significantly. Eliminating the Element[,Reals]
speeds it up even more, but that results in a lot of Complex values.
Answered by Bill on May 19, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP