Matrix calculations

33 Views Asked by At

Now I have something like this: $$p\beta^T\beta+q\beta^TX^TX\beta$$ where p and q are constants and $\beta$, X are matrices. I want to do something like this: $$\beta^2(p+qX^2)$$ Is this right?

My thought is that since $\beta X^TX\beta$ is just $(\beta X)^2$, so this is ok.

If this is wrong, can anybody tell me what is the right way to do a similar thing like extracting $\beta$?

Please help! I don't know where I can find any formulas for this.

1

There are 1 best solutions below

0
On

If you were to extract $\beta$, you need to extract it to behind the parenthesis. @tch is right. Also note that, only $||X||^2_2 = X^TX$