Symbolic Linear Algebra

asked 2015-05-27 16:59:07 +0200

Victor gravatar image

updated 2020-06-01 12:17:39 +0200

FrédéricC gravatar image

I'd like to manipulate symbolic expression in linear algebra. More specifically, suppose that A,B, etc. are matrices and v,w,.. etc are column vectors. I have various expressions in them that I'd like expanded and grouped. It also should know about transpose (that it's an involution). For example, if I write the expression:

transpose(v-w)A(v-w). It should be able to expand this to

transpose(v)Av - transpose(v)Aw - transpose(w)Av + transpose(w)Aw

Also, I'd like to specify that A is symmetric -- A == transpose(A). In that case the above would simplify to

transpose(v)Av - 2transpose(v)Aw + transpose(w)A*w

if we idenfity a 1 by 1 matrix with a scalar. It would also be nice, if we could specify symbolic scalars, and, for example to say that A in hom(V,W), where V,W are some vector spaces. In that case if we try to multiply things that are incompatible we would get an error. This looks like it should be part of some sort of universal algebra package. Does such a thing exist in SAGE?

edit retag flag offensive close merge delete