Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Creating a matrix from block

Suppose I have the following elements

A=matrix([[1, 2, 3, 4],[4, 3, 2, 1],[2, 4, 3, 1]])
b=vector([10, 20, 30])
c=vector([1, -2, 3, -1])
II=identity_matrix(3)
z=zero_vector(4)

Now I would like to construct a block matrix

A I | b

c z | 0

0 being a scalar

the | being facultative. I have tried many combination with block_matrix but with any success