In the present work, we investigate the stability problem for a third‐order switched linear system in which the eigenvalues of each subsystem are all positive real parts. Firstly, we introduce a degenerated linear mechanical model with two state variables, in which one of the mechanical equations degenerates to a nonholonomic constraint, thereby such a mode being treated as a mechanical system with 1.5‐degrees of freedom (DOFs). Secondly, we establish the corresponding relationship between the mechanical system with 1.5‐DOFs and a standard third‐order linear system so as to define an energy function with actual physical meaning. Thirdly, an invertible transformation is introduced to convert a general third‐order linear system to a standard one so as to calculate energy function easily. On this basis, we reasonably introduce an intermediate subsystem for a general third‐order switched linear system with two unstable subsystems, such that each subsystem and the intermediate subsystem can be converted to standard third‐order linear systems simultaneously via an identical invertible transformation. Accordingly, we construct an energy ratio function with the help of the energy functions of the intermediate subsystem and two subsystems. Fourthly, based on the obtained energy ratio function, a proper state‐dependent switching law is designed to guarantee asymptotic stability of switched systems. That is, the energy loss from switching is large enough to offset the energy increased from unstable subsystems operation in a switching loop. Finally, simulation results demonstrate the effectiveness of the proposed state‐dependent switching approach.