I'm having lectures on analytic geometry. I've learned that there is an associated matrix multiplication for a quadratic form:
$\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}
} )

*is element by element multiplication and only works for arrays of the same dimensions..(i.e.Dot) is used for matrix multiplication. Using $1\times n$ and $n\times 1 $ matrices for row and column vectors is not a problem, but not necessary either. For a vector you can just write{x,y,z}and not distinguish between row and column vectors. The order of multiplications (vec.matvsmat.vec) determines what will be done. – Szabolcs Jul 02 '15 at 09:05.really, the matrix notation is not harmful in any way. – Szabolcs Jul 02 '15 at 09:08