This paper deals with the stabilization of a class of time-dependent linear autonomous systems with a switched structure. For this aim, the switched dynamic system is modeled by means of an implicit representation combined with a Linear-Quadratic (LQ) type control design. The proposed control design stabilizes the resulting system for all of the possible realizations of its locations. In order to solve the Algebraic Riccati Equation (ARE) associated with the LQ control strategy one only needs the knowledge of the algebraic structure related to the switched system. We finally prove that the proposed optimal LQ type state feedback stabilizes the closed-loop switched system no matter which location is active. The proposed theoretical approaches are illustrated by a numerical example.