Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Partition of a given matrix into block matrix form

Q: Suppose B= block_matrix([ [P, Q], [R, S] ]) be a given matrix. Now if I type B[0,0], sage gives me the very first element of the matrix P, but I actually need the matrix P. How to get this one?

My actual problem is as follows.

Q: I have a 12X12 matrix A, I want to partition it into 3X3 block matrix. Then I need another 12x12 matrix (partitioned into 3x3 block) where (i,j)th block is the sum of (i,j)th block and (j,i)th block of the given matrix A.

Any suggestion will be highly appreciated. Thank you in advanced.