Karim Belabas on Fri, 18 Nov 2022 02:41:48 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Obtaining the coefficient matrix of multivariable homogeneous linear equation system.
|
- To: Hongyi Zhao <hongyi.zhao@gmail.com>
- Subject: Re: Obtaining the coefficient matrix of multivariable homogeneous linear equation system.
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Fri, 18 Nov 2022 02:40:43 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1668735643; c=relaxed/relaxed; bh=j5Q8qDjTM9FwaYhB2JtO299xbqca8NDcdoeDJQdb7HY=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=JYsmI0XvtFsMhnSAMNsjxnm4UU4EIOCrMS6pHQB4ilZyMHo6hK9Ei6yqg822+ieYCfUa+7jDPkuQCu5JmI+qyQkQfSUq+xpLY46OI9wx+idfzEu0YlToR9NJWYS4NDZId1dglgwk5e7NB8kqQVyKJDyGoFmawt9PyrJDqSbX3ubnwgTRs9W8jgxe7donYDsCixdh/NyF4wP5NOO+qXhx33v4Nr+4w/2E/NlnQGKn4OwmHE3OafT/7GlTpXMFbFNa8BLmP7VWHu36ynx27LVbiznTR+MK2C9pcHtf6MJhMakZcDCf+PZl/EAhFhqJXRldHpOJeq2OU0un9OXcFmeZ1CUVu0p/Ov4Z0iEm4NXdRZqm9oZoXgY6Os6Q7EK0hq0+6zim5XRR18o7//Vf4oeomOqxBr7I9PUzx1clnimnEiaAQlGR9/bnLqeNQUgBArvl4IHiCchQ6m20K51qqUJKskp3KyFyRMp93X9Iu1uN/ae5Yh0chIx2GtcgE31hJ4OAg11FUwDiU2LuSXVjixHX1LrwNvoBd1Mo+iUUnKr+gsdOlHePwrhG7v+Zinw2ryCVEiEs+9zLyHjY4ybrUKRJ7hBdd+xaFolBq2Fp+94hYgcBAcLiwA8sbmFC9uDcATsFdU8/L104icy1QeKaiiEpqnZFViUTpghAW/u9HjCRCys=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1668735643; cv=none; b=BNoWpfLKljOx3/DlndjqTSkSzk3Jm7eJ7OD/YqdtGED3AiNR+OlcNxUTM76TFMonK0Pxv+G7VtrfMXVF0pjCnx+AmGbSBmsPLAivgnlJZ9yvDdDmWCQWjdk/u58696qufuLqH6esJ6zFcAWL0KcaasnclOOZyVZcPSHdOPVxYRQCPoMDwChozetXt1QifFp/ZOfsoNkoUzaeNj72j/0D67d7VSNGiTbV1EPqJLbfq47qkKD72JyzxUtXEQseNrxVf6+gSB4OYFOqf6F9AFqGCe/KwKMa7xNziiidV9hx+4an5+Y6AZh09do0Z2mzIJkOnSirwdlOsXIp19vyKwfqcHTqMY+KJ4X0yRVOTsDojZOCM02XWZL04V3gJLyqNKZ3qs8E1gAZhzQ1FHM0YU4e8rtR1vICGEPlAEfQnrVbBv6zzExvxAilTYhCo95gcfFuOT+Vd0O/DU3v/cIHF2YLPCIZePTM1mVRC4ddMBg4IYVsVDuNpzcVyHt2b25hhoFjyoiqN0Yl9REzLD1GPP90w1rQpjDASPs8c3JFUiFSHA2HpbEIEfPqex5qspMIdEDK5u5lWVMlwVVLxRZmAMS9sHYCsWgrs9+EEDDJWBO9L9j3AUq07IS66/Hhhaua1uKwmVLxGMhNSl8Tj9A6TUqYzqgQMXuofbepV73687mDPSE=
- Authentication-results: smail; arc=none
- Cc: pari-users@pari.math.u-bordeaux.fr
- Delivery-date: Fri, 18 Nov 2022 02:41:48 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1668735643; bh=j5Q8qDjTM9FwaYhB2JtO299xbqca8NDcdoeDJQdb7HY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=hHSyI0OAV7Vmv/tLO4B+oP8OAiTBjITrnvcSDUWaR1dhtkjXvAwt6ka9kFsbpbToH 1bA+YN7x4e0pqZ5sSm/n3eK16lRhAj2KOYYJ+4t0glqQhrULFUfLl/S11zYQtJRezh jl/M5azx3y/J9j7pfw2k6HOLu9oSGf2mHNn8xtjGI/3LCtHa/MsumOg8K0giJLJ/gN GHX/wwjDkZP0LiQCnlMG6uz5MLX7gr8zTkuv2iFd2uXKbB3hY4AMb/IywxpNNE/EOa uBieFGPHiGVkEEBfina+Q+lGWHvLns/XR7dGhb7mm8tRrvwt6zxJu4qr6RgjJ0ops3 3m+rRtUjJIxVzh9dmxoQItmojT1WCov4kInas+/b7sRNd8gzDYAQda0vqaG2vQ4f3N 6e3qSXW+qSvSNHL1nlPt+7FbtEkIlu06hgRoKjEGOAfubQkLhiXA5fY/WyX15+HD4p tN+b0UQdjFLlarehsfC+gPtHDNkYny2sL2vqoe9jl7OjIvRjWFpXtNsluMhqMvA22E vmWF1FTW0xMdEO/Rqzv7t0SZ0hhgA879nHUIEY+9riNbR4q2Ao9NyQIXo4BZatMrnv Qt0eOeQz0/SU+fvHom0sVyxaEfd1Mfxi9dD1CzHhn1yE23oIBXtVc/v1tFB6XNcu7O /YqRXV4brQThM0qVSA+9s5Nk=
- In-reply-to: <CAGP6POJVxJQY9vnSptmAYDfTNm1tQKtuxqeY+4nx-ioGFncF8A@mail.gmail.com>
- Mail-followup-to: Hongyi Zhao <hongyi.zhao@gmail.com>, pari-users@pari.math.u-bordeaux.fr
- References: <CAGP6POJVxJQY9vnSptmAYDfTNm1tQKtuxqeY+4nx-ioGFncF8A@mail.gmail.com>
* Hongyi Zhao [2022-11-18 02:21]:
> Hi here,
>
> I've a multivariable homogeneous linear equation system as shown below:
>
> $ gp
> ? trmat=[x1,x2;x3,x4];A=[a,b;c,d];
> ? A * trmat - trmat *A
> %50 =
> [ x3*b - x2*c x2*a + ((-x1 + x4)*b - x2*d)]
>
> [-x3*a + ((x1 - x4)*c + x3*d) -x3*b + x2*c]
>
> Where, trmat=[x1,x2;x3,x4] corresponds to the variables. My aim is to
> obtain the corresponding coefficient matrix as follows:
>
> [[0, -c, b, 0], [-b, a - d, 0, b], [c, 0, -a + d, -c], [0, c, -b, 0]]
>
> Is there any way to achieve this goal?
Here's a basic idea
SUBST(e) = vector(4, i, substvec(e, [x1,x2,x3,x4], vector(4,j,i==j)));
Then:
? m = A * trmat - trmat * A;
? [ SUBST(m[i,j]) | i<-[1,2]; j<-[1,2] ]
%2 = [[0, -c, b, 0], [-b, a - d, 0, b], [c, 0, -a + d, -c], [0, c, -b, 0]]
Cheers,
K.B.
--
Karim Belabas / U. Bordeaux, vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
`