Variable matrices

asked 2017-11-20 23:01:49 -0600

Deepak Sarma gravatar image

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)).

edit retag flag offensive close merge delete

Comments

And your question is ?

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 2017-11-21 03:24:31 -0600 )edit

I want the determinant of N in terms of A,B,C,D as variables.

Deepak Sarma gravatar imageDeepak Sarma ( 2017-11-21 03:57:03 -0600 )edit

You want $\det N$ in terms of $\det A$, ..., $\det D$? SageMath is unable to give you this to the best of my knowledge. Note that it is not suprising: There is no such expression in a very general case. Only if some matrix is known to be invertible, or some matrices commute, etc. See on Wikipedia.

Now in your case of $2\times 2$ blocks, you may of course define $16$ variables $a_{11}$, ..., $a_{22}$, ..., $d_{22}$ and ask for this $16\times 16$ determinant. Then, you can try to reconstruct some expression based on the four $2\times 2$ determinants. But you'll need to have some assumptions at some point I guess.

B r u n o gravatar imageB r u n o ( 2017-11-21 10:01:56 -0600 )edit