Multiplying three matrices does not give expected form [closed]

I’m having lectures on analytic geometry. I’ve learned that there is an associated matrix multiplication for a quadratic form:

(xy1)(ab2d2b2ce2d2e2f)(xy1)\quad \quad \left(
x & y & 1 \\
\right) \left(
a & \frac{b}{2} & \frac{d}{2} \\
\frac{b}{2} & c & \frac{e}{2} \\
\frac{d}{2} & \frac{e}{2} & f \\
\right) \left(
x \\
y \\
1 \\

When I try to make Mathematica compute that, it says that objects of unequal length can’t be combined. But I have no idea of why that happens, I mean I assume that Mathematica may expect some other way to perform the matrix multiplication of this. But I don’t know how it should be done.

The code is as follows:

( {
{x, y, 1}
} )* ( {
{a, b/2, d/2},
{b/2, c, e/2},
{d/2, e/2, f}
} )*( {
} )



1 Answer


Matrices (and also vectors and other tensors) are multipled using Dot.

Using your code, just replace * by . (I also removed all (‘s and )’s as they don’t do anything in this context.

{{x, y, 1}}.{{a, b/2, d/2}, {b/2, c, e/2}, {d/2, e/2, f}}.{{x}, {y}, {1}}