Bill Allombert on Sun, 15 Jan 2023 10:20:41 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: The companion matrix of a polynomial.
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: The companion matrix of a polynomial.
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sun, 15 Jan 2023 10:19:29 +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=1673774365; c=relaxed/relaxed; bh=KjjgClljd3KUwBGk0J0YFt0c7lZSGGIlKkmgmYX05wc=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=eoKBcl6jWBnn46BsCj7Ui9l6u8/W9XSMAx+1kEf5UWyeiYkmlmEldiV/TLIsiaJSHRnsMtk5VQVR0tRHfi8gdwbZh+z6Ct/ohn0PM8oNWyzF8WQnaC05orbZn3GcAmOOpcRVO9T8gQ8BFZW/IrFg3FkJKM6kITW/GPb+D0+4H7WHAUG/0PtVULet7YBdIMXGgeZKTSe1e15Jv9MRC7nWqYHq2+lUx1CXau4nStMSLcGQDf6al4E/azKimU0yQdbvNrT+7mcsoWIK7O5WCwOKXyqBRN18+ZBK9WnphcZDCGpNPsvnvYXZowJDMf2Q5BjDpMcrMFF6co8jttqWS/BilC8TsqIDWZPjGG4O3PJwxKjnoGwDd1H3dGFIGRMSy4RhPKCjt1Lduocc7uh6DVAgwiRkmdcyL4hwIBca5uc1Ak1T1oOEKgt0i5bGpe7FRgmS4iHYSoPss93h2bPzxh5S6aecGCG3mFLpnOndYlZgjpl+byiEtOKuDc3oYc15WsbR+3ILuLFA15EXWDJn8/Di3GGa5UqKKUoVzNWzFNQvhr3ondHBydDeSPsFkin0M5jQ1yweiI0drixjKjz2gp0EWB8P4OGfxKr9d9/O8HOub7gYM5oyDCe7WGM7hv8VVRjA9UQvOnKhLqq3Em0KeSblFIyGIIkzz4ija5RYE+JL2O8=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1673774365; cv=none; b=w0Q1g3yJ4d6QOVsp5hsIXs9RyykoliUe68uxxJkN5qxUx/0LVc3Z3v2pc/NEcUp1mMEJVV7BTSJiD1Xrc7RSTxQr36ycBhO/GMvzg8eTLd5polp25uhCpJwJqCW3CjJaB6oOtoSP1oegvIFnNDQ1aF2s1t/8PIyPGDM83zLgcbQ6Rpbs5DgMbmuNdd2+3Q6o5cUn05TRcVlaH0SwT772gW3CqZh/N8suXlH6VHwRBY5nOIbcDiS9r8o0ZN/uKs0CU0CxFPnIyys1Wq7b+dgqBTbxIV+Ciz3r4I/GxMQth+OUzYPcU2e7y/NwM4ebtgxDPl93hbR3l5DyuNUfpaH+ITLzT36HKaqD9S2ACAaFNn2W71TMyaf9H2Y8RWWoprorg5qPtWFkfxDNzEEP36hj83WWsQ6It5lNBiAnLwW+JkPNFFACZH2/csa6CzqY1QH3nyNyeAi+JZN4cK+pBQvSVPqXTD3yq3D7VFByK9PR4aBHLhZckvvCL1ozGbkVFro2mqlgV2AgI/SYdPDt+L85Fqw/bDWtvC4+hIVGSuGWJmRPPPgGLjEkvbL6pteP1Au+XNt+nN2nhVxmpnOt0fP5/s7McKLrMdMHwaLWrNmIl/NLdm96M8Bvro9DuHrGcYzk2c8iuwHnAnJLegvSbKiF7j1UPJ9l6VoQI3061XMk7rw=
- Authentication-results: smail; arc=none
- Delivery-date: Sun, 15 Jan 2023 10:20:41 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1673774365; bh=KjjgClljd3KUwBGk0J0YFt0c7lZSGGIlKkmgmYX05wc=; h=Date:From:To:Subject:References:In-Reply-To:From; b=gZzxCL8saPORnfFXjskuDI+37JzLn6nksExk8k++DWzCNhOKdzl/oAENqfhFUnQdQ kvgt8kjcYXxTLVBUcO7YF9nSnYZ+unJktf9o9+UfRZBMD23KmscB5NqXRrNEOqpLwJ bEIPStj3K2nRpPcKC5f9J9Sy+VXUuVutIdrwTjPMvvUTOMT6Cc5ngD/uYFkbwB6OOX EQ5Pc/NJmXsgWdAyxWdOvCyau1nsuyQc7p9VxLyOOEMsMrEPoEVaQTwpSXOGvhB8er wG0sHabVCKKry6bKyoCSBcXySig/DKRP9P7ZkXL7i052rGmdI5suDn2J18MGxOIQM9 h2/g7xa/aIV4JY2DMxlnfo5lpXbCgSwlbD+VRSjMBzpcfqXsxWKpQY9/Xc2SBLMR7J 3A1Cs5Pw38XZFiqmCOyzYmzPYnr0Sftgi2dU1Kub7f2AI8RpiDc5WASNXSiQdko6QO 3uJIsYhmL/+J2R2sVHrJhu5O7QS9257Beja2ZBu4XDVvvq4HoSEdjNC72t+FqqUZ/y im+Xrz4Vc4WoTgd84ulGjpETkszpiYcA5WTivtNm7RHTLiW1X0Sz3TfMLFy6vnrVUm nAoy3nU8GiSIJ4ZuHYDZ9lqDvpiAVNApPmGr1uP6E+GyuY7MPWjhSU3lTJDoD7qKbl cGnEiGjkAkJUMFWpCeiAJOQM=
- In-reply-to: <CAGP6POLzvdPdczpK_10Ouf9Mk_+UuoaMgDhnFy-q0pG+FYw+mw@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAGP6PO+ck4DH9ydj-qARp07pgK3HChxZgiyqfFQtWBij7PUivA@mail.gmail.com> <CANXmBjw_R1g7gSLY_UUaj6-V6XPW7ZJTbW_xLKP9zimpd2a_Ag@mail.gmail.com> <CAGP6POLRUp97KZQngX9GuJqYKyNLVfocavBo4_f+uX1nMuCMkw@mail.gmail.com> <CANXmBjyyyb0hBpby=SD_z2f=TjYZrZZR8W6L6Kmqq4n85sk5-A@mail.gmail.com> <CAGP6POLzvdPdczpK_10Ouf9Mk_+UuoaMgDhnFy-q0pG+FYw+mw@mail.gmail.com>
On Sun, Jan 15, 2023 at 09:12:07AM +0800, Hongyi Zhao wrote:
> On Sat, Jan 14, 2023 at 9:58 PM Charles Greathouse
> <crgreathouse@gmail.com> wrote:
> >
> > I'm not at all sure what you're doing here. The GAP source
> > https://github.com/gap-system/gap/blob/3d47e2bc40869ea1b232a0a658d47b1897880fec/lib/upolyirr.gi#L82
> > seems to require that the input to CompanionMat be a polynomial or a list of coefficients of a polynomial. It doesn't seem like it can do anything meaningful to a matrix.
>
> I want to get the companion matrix of matrix A in GP, which can be
> generated in GAP, as shown below:
> gap> A:=[[-1,3,-1,0,-2,0,0,-2],
> > [-1,-1,1,1,-2,-1,0,-1],
> > [-2,-6,4,3,-8,-4,-2,1],
> > [-1,8,-3,-1,5,2,3,-3],
> > [0,0,0,0,0,0,0,1],
> > [0,0,0,0,-1,0,0,0],
> > [1,0,0,0,2,0,0,0],
> > [0,0,0,0,4,0,1,0]];;
> gap> P:=RationalCanonicalFormTransform(A);;
> gap> C:=A^P;
> [ [ 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 1, 0, 0, 0, 0, 0, 0 ], [ 0, 0, 0,
> 0, 0, 0, 0, -1 ], [ 0, 0, 1, 0, 0, 0, 0, -4 ],
> [ 0, 0, 0, 1, 0, 0, 0, -4 ], [ 0, 0, 0, 0, 1, 0, 0, 2 ], [ 0, 0, 0,
> 0, 0, 1, 0, 4 ], [ 0, 0, 0, 0, 0, 0, 1, 0 ] ]
This is the rational canonical form (aka the Frobenius form), not the companion matrix.
In GP, it is matfrobenius. There is a flag to the the transform. Read the doc.
Cheers,
Bill.