How to express the following sum term into vector product?

40 Views Asked by At

I want to express the following sum into vector product of $\beta$ and $\lambda$, where $\beta = (\beta_{1},...,\beta_{p})^{T},\lambda = (\lambda_{1},...,\lambda_{p})^{T},$:

$$sum = \sum_{k=1}^{p} \lambda_{k}\beta_{k}^{2}$$

Can anybody help?

1

There are 1 best solutions below

0
On BEST ANSWER

You can write fot instance $\mathbf{\beta}^T \mathrm{diag}(\lambda) \mathbf{\beta}$.