How can we convert the dot product of 3 vectors to a matrix form?

In particular, We have $\sum_{i=1}^m (\langle \vec{w},\vec{x_i}\rangle -y_i)\vec{x_i} = 0$, how and why can we convert it to the following matrix form?

$Aw = b$ where $A = (\sum_{i=1}^m x_i x_i^T)$ and $b = \sum_{i=1}^{m} y_i \vec{x_i}$

Detailed derivation will be welcome! Thank you!

  • 1
    $\begingroup$ An attempted derivation on your part will also be welcome. $\endgroup$
    – John Douma
    Oct 19 '19 at 9:12
  • $\begingroup$ Thanks, I have got the correct answer by my effort. $\endgroup$
    – Ben
    Oct 15 '20 at 1:15

First, $\sum_{i=1}^m \langle \vec{w},\vec{x_i}\rangle \vec{x_i}$ can be referred to the following form:

$(\vec{x_1}, \vec{x_2},\dots, \vec{x_m})$$\left[\begin{array}{c} \langle \vec{w},\vec{x_1}\rangle \\ \langle \vec{w},\vec{x_2}\rangle \\ \dots \\ \langle \vec{w},\vec{x_m}\rangle \\\end{array}\right] $

Then $\left[\begin{array}{c} \langle \vec{w},\vec{x_1}\rangle \\ \langle \vec{w},\vec{x_2}\rangle \\ \dots \\ \langle \vec{w},\vec{x_m}\rangle \\\end{array}\right] $ can be reformulated as

$\left[\begin{array}{c} \vec{x_1^T} \\ \vec{x_2^T} \\ \dots \\ \vec{x_m^T} \\\end{array}\right] $$w$

Then we can get

$(\sum_{i=1}^m x_i x_i^T) w$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.