Hongyi Zhao on Sat, 19 Nov 2022 13:38:52 +0100

 Re: Obtaining the coefficient matrix of multivariable homogeneous linear equation system.

• To: Hongyi Zhao <hongyi.zhao@gmail.com>, pari-users@pari.math.u-bordeaux.fr
• Subject: Re: Obtaining the coefficient matrix of multivariable homogeneous linear equation system.
• From: Hongyi Zhao <hongyi.zhao@gmail.com>
• Date: Sat, 19 Nov 2022 20:37:38 +0800
• Delivery-date: Sat, 19 Nov 2022 13:39:02 +0100
• References: <CAGP6POJVxJQY9vnSptmAYDfTNm1tQKtuxqeY+4nx-ioGFncF8A@mail.gmail.com> <Y3bim0TfqmhFKiw/@math.u-bordeaux.fr> <CAGP6POKye8_3pVNC86DUJT6mswpTu3=dZciHkmdZ_tWCkRHoYA@mail.gmail.com> <Y3dqmzrWPLpcezNZ@seventeen>

```On Fri, Nov 18, 2022 at 7:21 PM Bill Allombert
<Bill.Allombert@math.u-bordeaux.fr> wrote:
>
> On Fri, Nov 18, 2022 at 10:36:34AM +0800, Hongyi Zhao wrote:
> > But I still have some further minor questions:
> >
> > 1. How to reshape the above output so that it can be feed to matker
> > directly, as follows:
>
> Do as told in linear algebra course:
> Choose a basis and apply your linear function to all elements of the basis.
>
> ? trmat=[x1,x2;x3,x4];A=[a,b;c,d];
> ? A * trmat - trmat *A
>
> do
>
> ? A     = [a,b;c,d];
> ? basis = [matrix(2,2,k,l,k==i&&l==j)|i<-[1..2];j<-[1..2]]
> %2 = [[1,0;0,0],[0,1;0,0],[0,0;1,0],[0,0;0,1]]
> ? C     = [A * B - B * A  | B<-basis]
> %3 = [[0,-b;c,0],[-c,a-d;0,c],[b,0;-a+d,-b],[0,b;-c,0]]
> ? D     = Mat([concat(Vec(c))  | c<-C]~)
> %4 = [0,-c,b,0;-b,a-d,0,b;c,0,-a+d,-c;0,c,-b,0]
> ? matker(D)
> %5 = [1/c*a-d/c,1;1/c*b,0;1,0;0,1]

Thanks for the insightful tip. I will try to apply this approach
to my actual problem.

> Cheers,
> Bill.

Best,
Zhao

```