If there is a way of using variables or named constants and retaining these functions, how could I do that?
If there isn't a way, I do know that I could manage to write these problems without the MO matrix class.
I tried these by using a matrix A = [x 1](as a perl variable, $A) with one element x, which I think is a Math Object formula here.
Display (in text): The matrix displays perfectly normally as if it were completely numeric.
Scalar Multiplication: If I multiply A by 5, and display this in the text section, I find that this is not multiplied through as it would be if A were completely numeric. So it shows [x 1]*5 rather than [5x 5]. Further, if I try to call the method "ans_array()" on it, this produces a singular blank rather than several for a matrix answer.
Transpose, Trace, etc.: If I call any of these type of methods on A, I get an error like this:
So $A->transpose; gives me an error.
So I deduce from this that having x in the matrix might make this variable $A be interpreted as a Formula rather than a Matrix.
Attached are a screencap and the code.