Blog Archive

Wednesday, May 17, 2023

Using matrix to count the product of two polynomias

Consider two polynomials, without losing generality, p(x)=1+x+3x2,q(x)=3+5x+2x2

Represent polynomials to Matrix, that is Mp=(113),Mp=(352)

and consider MpMq=(3523529156)

Observe that aij,i+j=k is a coefficient of xk, and consider ai+1j1...

The coefficient of xk is i+j=kaij

It corresponds to, just watch the slanted-up 45 degrees, in this case, 3,(3,5),(9,5,2),(15,2),(6)

So we get pq(x)=p(x)q(x)=3+8x+16x2+17x3+6x4

Actually, we can also use this to count products of natural number

Because you can write abc as a×102+b×101+c×100

And you need to simplify the final result because all the coefficients <10

For example, consider 124×243

(124)(243)=(24348681612)

So we get (2,8,19,24,12)=(2,8,19,25,2)=(2,8,21,5,2)=(3,0,1,3,2)

So the answer is 30132

No comments:

Post a Comment

Popular Posts