# Revision history [back]

### Variable matrices

If I type M = matrix(SR, 2, var('a,b,c,d')); show(~M), it gives me the inverse of the matrix M with entries in terms of a,b,c,d. Now what I want is to set four variable matrices A,B,C,D each of size 2x2 and then I want to create the block matrix N=block_matrix([[A, B], [C, D]]). Finally I want some functions of N in terms of A,B,C,D (say det(N)).

 2 None slelievre 12561 ●11 ●122 ●250 http://carva.org/samue...

### Variable matrices

If I type type

sage: M = matrix(SR, 2, var('a,b,c,d')); show(~M), var('a,b,c,d'))
sage: show(~M)


it gives me the inverse of the matrix M with entries in terms of a,b,c,d. a, b, c, d.

Now what I want is to set four variable matrices A,B,C,D A, B, C, D, each of size 2x2 2x2, and then I want to create the block matrix N=block_matrix([[A, matrix

sage: N = block_matrix([[A, B], [C, D]]). D]])


Finally I want some functions of N N in terms of A,B,C,D (say det(N)).A, B, C, D.

For example, how can I get det(N) in terms of A, B, C, D?