Little confused on the rules here, obviously if I treat it as a vector and its transpose I can compute this if I knew each vector entry but I am keen to know the general rule for any vector: (x−y)(x−y)^T How does it relate to (x−y)(x−y)=x^2−2xy+y^2

tonan6e

tonan6e

Answered question

2022-09-07

How to multiply out brackets when they contain vectors
I am keen to know the general rule for any vector:
( x y ) ( x y ) T
How does it relate to ( x y ) ( x y ) = x 2 2 x y + y 2
Thanks for your help

Answer & Explanation

Abigayle Lynn

Abigayle Lynn

Beginner2022-09-08Added 12 answers

To see why removing brackets is a bit different, you can remove them step by step:
( x y ) ( x y ) T = x ( x y ) T y ( x y ) T = x x T x y T y x T y y T
The result cannot be simplified any further, because unlike the scalar case, x y T y x T
Deanna Gregory

Deanna Gregory

Beginner2022-09-09Added 3 answers

EDIT/CAVEAT: I am interpreting the vectors as row vectors. Please see the other answer for interpreting the vectors as column vectors.
You're correct that you should treat it as the vector and its transpose. This is called an "inner product", or a "dot product". In the trivial case that the vectors are both scalars, it reduces to the formula you said. Otherwise, it becomes
x x T x y T y x T + y y T
= | x | 2 2 x y + | y | 2

Do you have a similar question?

Recalculate according to your conditions!

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?