(Requires Appendix material)If the Gauss-Markov conditions hold, then OLS is BLUE. In addition, assume here that X is nonrandom. Your textbook proves the Gauss-Markov theorem by using the simple regression model Yi = β0 + β1Xi + ui and assuming a linear estimator  Substitution of the simple regression model into this expression then results in two conditions for the unbiasedness of the estimator:  = 0 and  = 1.
The variance of the estimator is var(
   X1,…, Xn)=   Different from your textbook, use the Lagrangian method to minimize the variance subject to the two constraints. Show that the resulting weights correspond to the OLS weights.