Despite this I get the error message that the objects is of unequal length. The matrices are:
s={{x1,x2,x3,x4}}
t={0.0284435,0.00395759,0.000211963,0.0357403},{0.00395759,0.0113862,-0.000199939,-0.000556137},{0.000211963,-0.000199939,0.00118147,-0.00043913},{
0.0357403,-0.000556137,-0.00043913,0.0649449}
I must use double level in the 1 row matrix, since otherwise Transpose[] complains that it needs at least 2 levels. I tried without this as well, but I keep getting:
Thread::tdlen : Objects of unequal length in {{x1,x2,x3,x4}}{{0.0284435,0.00395759,0.000211963,0.0357403},<<2>>,{<<10>>,<<3>>}}{{x1},{x2},{x3},{x4}} cannot be combined. >>
. when I run s*t*Transpose[s].
I've spent hours trying to figure this simple problem out, but without any luck. Any pointers guys? It doesn't help if I change the order of the transpose...
s = {{x1, x2, x3, x4}};
t = {{0.0284435, 0.00395759, 0.000211963, 0.0357403}, {0.00395759,
0.0113862, -0.000199939, -0.000556137}, {0.000211963, -0.000199939,
0.00118147, -0.00043913}, {0.0357403, -0.000556137, -0.00043913,
0.0649449}};
Dot[Dot[s, t], Transpose[s]] // Simplify
{{0.0284435 x1^2 + 0.0113862 x2^2 - 0.000399878 x2 x3 +
0.00118147 x3^2 +
x1 (0.00791518 x2 + 0.000423926 x3 + 0.0714806 x4) -
0.00111227 x2 x4 - 0.00087826 x3 x4 + 0.0649449 x4^2}}
Vivek