I'm trying to perform vector and matrix operations by using the mathJS package.
I have a vector which I want to turn into a matrix by mulitplying with its transpose.
The expected result would be
a = [1 1 1], [1x3] vector
a^T = [1 1 1]^T, [3,1] vector
[1, 1, 1]
a^T * a = [1, 1, 1]
[1, 1, 1]
For some reason I'm having problems constructing a column vector in javascript because
const test1 = math.multiply(math.transpose([1, 1, 1]), [1, 1, 1]);
const test2 = math.multiply([1, 1, 1], math.transpose([1, 1, 1]));
both test1 and test2 returns 3. What am I missing?