This lecture presents an example of computing a linear controller to minimize the closed-loop performance metric for a system with a state-space representation. It covers the computation of the controller using LQR, the closed-loop system, the effect of reference inputs, step response analysis, choice of weights, and implementation in Matlab.