Solution of the Linear-Response Equations in a Basis Set