A dot product multiplies corresponding components of two vectors and adds the results, producing a scalar. In portfolio construction, it computes expected return as the weighted average of asset-level expected returns: μₚ = w · μ = wᵀμ. section 2.2
Expected portfolio return
For a portfolio containing FE, WMT, and AAPL, weights such as [0.2, 0.3, 0.5] combine with the corresponding expected-return vector. NumPy’s @ operator performs the multiplication and summation, producing an expected portfolio return of 9.5% for the illustrated inputs. section 2.2
The same operation evaluates future outcomes in dynamic programming. For each wealth state and asset allocation, transition probabilities form a vector, and the dot product with future-state values gives the allocation’s expected value. section 6.2.1











