I'd like to use the syms package to do some algebra for me, but the baseline assumption seems to be that variables are scalars. I would like to denote some variables as matrices. This will change the symbolic output/calculations. For example: inverse is not division, operations are not all commutative, and things can be transposed. Below I've illustrated a little bit of what I'd like to be able to do.
syms x
b=(x' * x)^(-1)
b=(x' * x)^(-1) * x
I want this code to treat 'x' as a matrix, such that I should get $(X'X)^{-1}X$, and there would be no simplification. However, the output is 1/x^2
for the first line and 1/x
for the second line. Is there a way to do this in octave?