Please refer to 
The present disclosure provides an optical system disposed in an electronic device. The optical system includes the optical module 2-100, the supporting frame 2-54, the first elastic elements 2-561, the second elastic elements 2-562, the first driving assembly 2-DA1, and the base 2-58. The supporting frame 2-54 is configured to support the optical module 2-100, and the supporting frame 2-54 is movably connected to the base 2-58 via the first elastic elements 2-561 and the second elastic elements 2-562. When the user uses the electronic device to take pictures and the electronic device is not placed horizontally, the first driving assembly 2-DA1 can drive the supporting frame 2-54 with the optical module 2-100 to rotate around the optical axis 2-O, so as to achieve the purpose of image compensation.