Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

answered 7 years ago

nbruin gravatar image

How do you want to multiply a 1x1 matrix with a 6x6 matrix? Do you want to take the scalar multiple of the 6x6 matrix by the sole entry of the 1x1 matrix? That is something you can do. If your first matrix is A and your second one is B then sage will quite happily compute

A[0,0]*B
click to hide/show revision 2
No.2 Revision

How do you want to multiply a 1x1 matrix with a 6x6 matrix? Do you want to take the scalar multiple of the 6x6 matrix by the sole entry of the 1x1 matrix? That is something you can do. If your first matrix is A and your second one is B then sage will quite happily compute

A[0,0]*B

Based on the comments below, perhaps you're looking for something like this instead:

sage: R.<x,y>=GF(31)[]
sage: B=matrix(GF(31),2,2,[1,2,3,4])
sage: L=[x^2,x*y,y^2]
sage: [f*B for f in L] 
[
[  x^2 2*x^2]  [  x*y 2*x*y]  [  y^2 2*y^2]
[3*x^2 4*x^2], [3*x*y 4*x*y], [3*y^2 4*y^2]
]