I have a function s^T x_i x_j^T s where s in bbR^d and x in bbR^d which is computed at every index of matrix which means K_(ij)=s^T x_i x_j^T s with K_(ij) in bb(R)^(n xx n). Now if i take any vector v in bbR^n then how to multiply that vector with matrix with matrix in this form v^T.K.v. What I have done so far is sum_(i,j) z_i.(s_i.x_i.x_j.s_j).z_j Is it possible to complete the square of the above term with the one given below? sum_i norm(z_i.s_i.x_i)^2.

Taniya Melton

Taniya Melton

Answered question

2022-10-30

I have a function s T x i x j T s where s R d and x R d which is computed at every index of matrix which means K i j = s T x i x j T s with K i j R n   x   n . Now if i take any vector v R n then how to multiply that vector with matrix with matrix in this form v T . K . v. What I have done so far is
i , j z i . ( s i . x i . x j . s j ) . z j
Is it possible to complete the square of the above term with the one given below?
i | | z i . s i . x i | | 2

Answer & Explanation

Krystal Dillon

Krystal Dillon

Beginner2022-10-31Added 10 answers

Let { ε i } denote the standard basis vectors, and collect the { x i } into the columns of a matrix X such that
X = [ x 1 x 2 x n ] x i = X ε i
Then the K matrix can be written as
K i j = s T ( X ε i ) ( X ε j ) T s = s T X ε i ε j T X T s = ε i T X T s s T X ε j ε i T K ε j K = X T s s T X = k k T ( k X T s )
The scalar product in question is therefore
v T K v = v T k k T v = k T v 2 = s T X v 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?