# Expectation of Euclidean Norm and Quadratic Forms

If $\boldsymbol{\beta} \sim \mathcal{N}_p(\boldsymbol{\mu}, \boldsymbol{\Sigma})$, can someone please help me understand why $\mathbb{E}[||\boldsymbol{\beta}||_2^2] = ||\boldsymbol{\mu}||_2^2 + \text{trace}(\boldsymbol{\Sigma})$

Further, how does this expectation change if we instead consider $\boldsymbol{\beta}^T\textbf{W}\boldsymbol{\beta}$, where $\textbf{W}$ is a diagonal matrix?

Thank you!

$E[\beta]$ quantifies the expected squared Euclidean distance of a vector from the origin. The relation you stated holds for any random vector with finite second moment. It implies that the expected distance depends on the distance from the mean ($\mu$) to the origin, and the expected variability around this mean ($Trace(\Sigma)$).
$\beta W \beta$ is the Euclidean norm iff $W$ is the identify matrix. For general properties of moments of random quadratic forms, you can consult Section 6.2.2 in the [Matrix CookBook] (http://www.math.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf), and references therein.