If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

# Expressing a quadratic form with a matrix

How to write an expression like ax^2 + bxy + cy^2 using matrices and vectors. Created by Grant Sanderson.

## Want to join the conversation?

• Is there a way to write a cubic form with vectors and matrices (or possibly tensors of rank 3)? What about forms of greater degrees?
• Why does Grant use the transposed vector instead of taking the dot product of the vector? The computations for both methods is the same, but what is the underlying meaning in using the transposed vector? So instead of x^T Mx it would be x ·Mx.
• You've answered your own question, so there's no point for me to answer this, but yes, we use the transposed version of x so that it becomes a 1 X 2 matrix, which can then be multiplied to a 2 X 1 matrix. Otherwise, the matrix multiplication is undefined.
• As grant explained on 3B1B that multiplying transpose of the vector is same as taking the dot product. This quadratic form will convert to Mx . x. Then why is the transpose notation used? This one seems easier...(to me)
• In vector notation, it is `(Mx)·x`. But when the same is translated to Matrices, you get `x'Mx`. This is just the way Matrices implement a dot product. They are one and the same.
(1 vote)
• Interesting to note is that you can multiply two quadratic forms with matrix multiplication, except you get an additional term |x|^[2(n - 1)] where n is the number of terms being multiplied.
• Up till now we've always used dot product notation to represent a transpose inner product, is there any advantage to writing it this way instead?
• Other people have asked, but why not compute (Mx).x instead? Is it just a random choice?