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(

\begin{array}{ccc}

x & y & 1 \\

\end{array}

\right) \left(

\begin{array}{ccc}

a & \frac{b}{2} & \frac{d}{2} \\

\frac{b}{2} & c & \frac{e}{2} \\

\frac{d}{2} & \frac{e}{2} & f \\

\end{array}

\right) \left(

\begin{array}{c}

x \\

y \\

1 \\

\end{array}

\right)

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}

} )*( {

{x},

{y},

{1}

} )

=================

=================

1 Answer

1

=================

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}}

Result: