If x is a n xx 1 vector, are the entries of diag(xx^T) given by x^T x?

Jenny Roberson

Jenny Roberson

Answered question

2022-11-05

If x is a n × 1 vector, are the entries of diag( x x T ) given by x T x?

Answer & Explanation

grizintimbp

grizintimbp

Beginner2022-11-06Added 16 answers

x T x is a 1 × 1 matrix. It can't contain the n diagonal values you seek. Instead, their sum is ( x T x ) 11 . Using Einstein notation,
( x T x ) 11 = x i x i = diag ( x x T ) i i = Trace ( x x T ) ,
because diag ( x x T ) i j = x i x j

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?