On Tue, 30 Jul 2019 at 05:56, Kwankyu <ekwan...@gmail.com> wrote: > > > On Thursday, July 25, 2019 at 12:08:20 AM UTC+9, chandra chowdhury wrote: >> >> I have matrices B and C of size (m,n) over integer with m>n. >> I know there is matrix A of size (m,m) such that >> AB=C. How to find A efficiently in Sage? >> > Try B.solve_left(C). For example:
sage: B = Matrix(2,3,[1,2,3,4,5,6]); B [1 2 3] [4 5 6] sage: A = Matrix(2,2,[1,1,1,2]); A [1 1] [1 2] sage: C = A*B; C [ 5 7 9] [ 9 12 15] sage: B.solve_left(C) [1 1] [1 2] sage: B.solve_left(C) == A True > > I guess there is no special way in Sage to solve your kind of problem. > Just solve for each row of A. > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sage-support+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sage-support/021a81f6-9ba9-4066-bf30-9dd0796f97e7%40googlegroups.com > <https://groups.google.com/d/msgid/sage-support/021a81f6-9ba9-4066-bf30-9dd0796f97e7%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/CAD0p0K7oC9Yphjh144vVXZMUk40xFOacrXcM1L2Shb_a1R%3Dxnw%40mail.gmail.com.