Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This works for me in 4.6.2:

sage: A = matrix(QQ, 2, 2, [3,9,6,10])
sage: block_matrix([ [A, -A], [~A, 100*A] ])
[    3     9|   -3    -9]
[    6    10|   -6   -10]
[-----------+-----------]
[-5/12   3/8|  300   900]
[  1/4  -1/8|  600  1000]

Previously I think you had to write

sage: A = matrix(QQ, 2, 2, [3,9,6,10])
sage: block_matrix([A, -A, ~A, 100*A])
[    3     9|   -3    -9]
[    6    10|   -6   -10]
[-----------+-----------]
[-5/12   3/8|  300   900]
[  1/4  -1/8|  600  1000]

or at least you did back in 4.5.1, and it looks like the constructor was rewritten not so long ago. Check your block_matrix's help.

This works for me in 4.6.2:

sage: A = matrix(QQ, 2, 2, [3,9,6,10])
sage: block_matrix([ [A, -A], [~A, 100*A] ])
[    3     9|   -3    -9]
[    6    10|   -6   -10]
[-----------+-----------]
[-5/12   3/8|  300   900]
[  1/4  -1/8|  600  1000]

Previously I think you had to write

sage: A = matrix(QQ, 2, 2, [3,9,6,10])
sage: block_matrix([A, -A, ~A, 100*A])
[    3     9|   -3    -9]
[    6    10|   -6   -10]
[-----------+-----------]
[-5/12   3/8|  300   900]
[  1/4  -1/8|  600  1000]

or at least you did back in 4.5.1, and it looks like the constructor was rewritten not so long ago. Check your block_matrix's help.help.. or upgrade, I guess. :^)