Ask Your Question
0

Direct sum of matrix spaces

asked 2014-03-23 03:09:32 -0500

vuur gravatar image

Is it possible to construct a direct sum of matrix spaces?

For example:

M1 = MatrixSpace(QQ, 1)
M2 = MatrixSpace(QQ, 2)
M = DirectSum(M1, M1, M2)    # doesn’t work

Thanks

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-03-25 10:24:31 -0500

tmonteil gravatar image

You can do:

sage: M = CartesianProduct(M1, M1, M2)
sage: M
Cartesian product of Full MatrixSpace of 1 by 1 dense matrices over Rational Field, Full MatrixSpace of 1 by 1 dense matrices over Rational Field, Full MatrixSpace of 2 by 2 dense matrices over Rational Field

But then you will lose the algebra structure:

sage: M.category()
Category of enumerated sets
sage: M1.category()
Category of algebras over Rational Field

It should be possible to keep this structure by doing something like:

sage: M1.cartesian_product(M1,M2)

But then you will get an

AttributeError: type object 'MatrixSpace' has no attribute 'CartesianProduct'
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-03-23 03:09:32 -0500

Seen: 189 times

Last updated: Mar 25 '14