3

In my numerical methods course we got a homework problem that has a definition of a function

$\phi(x) = vec(M) - x \otimes x $

where $x\otimes x$ is the kronecker product of an n-vector and $ M $ is an $n\times n$ Matrix that is vectorized (flattened) in column-major by the $vec()$ operator.

I got confused as I thought the kronecker product would produce an $ n\times n$ matrix. But according to the instructor it's a vector?

How would I compute the kronecker product of two vectors? I thought it would be the entries of the first vector times the second vector appended in a matrix.

Thanks for anyone who can share some enlightenment. I tried to find some on Wikipedia but the examples there confirm my confusion.

I looked at this already: Kronecker product and outer product confusion

Thank you!

oliver
  • 685
  • 1
    Just the usual kronecker product of matrices but taking $x$ to be a $1\times n$ matrix. – Rammus Jan 11 '21 at 14:09
  • Hi @Rammus, thank you. Does this not result in a matrix with $ x_1x $ as the first column $ x_2x $ as the second .... $ x_nx $ as the last column? – oliver Jan 11 '21 at 14:12
  • 1
    No it should be a vector $(x_1 x_1, x_1 x_2, \dots, x_1 x_n, x_2 x_1, x_2 x_2, \dots,x_nx_n)$. Try having a look at the matrix Kronecker product again. – Rammus Jan 11 '21 at 14:24
  • Thank you @Rammus ! As I feared I have misunderstood the kronecker product. – oliver Jan 11 '21 at 14:26
  • 2
    It might be better to put everything inside the vec function, i.e. $${\rm vec}(M) - x\otimes x ;=; {\rm vec}(M-xx^T)$$ – greg Jan 11 '21 at 15:48

1 Answers1

2

The vector $x$ should be regarded as a matrix consisting of a single column. It then makes sense to consider the Kronecker product $x \otimes x$.

Bart Michels
  • 26,985
  • 6
  • 59
  • 123