variance of a portfolio with n assets

the lakalaka combines which of the following elements: