The stabilization of the non-linear inverted pendulum system requires a robust control strategy, as this system is inherently unstable and sensitive to disturbances. This research utilizes Lagrangian mechanics, a powerful technique in analytical dynamics, to derive the mathematical representation of the system. By applying the principles of Lagrangian dynamics, we can accurately model the energies involved and derive the equations of motion that govern the pendulum’s behavior. Following this, state-space feedback is employed to determine the Proportional, Integral, and Derivative (PID) values essential for effective control. This control strategy is particularly useful due to its ability to minimize error over time and ensure stability. To further enhance the control process, a comprehensive mathematical model is developed to establish the transfer function that correlates the pendulum's angle with the displacement of the cart. This relationship is crucial for understanding how changes in the cart's position affect the pendulum's stability. To validate the proposed control law, extensive simulations are conducted, allowing for comparative analysis against an Integer Order Controller. These simulations not only highlight the effectiveness of the PID controller but also provide insights into the dynamic behavior of the system under various conditions. The results demonstrate significant improvements in settling time and overshoot, showcasing enhanced performance metrics for the selected objective functions. This research contributes to the broader field of control systems engineering, suggesting that advanced control strategies can effectively manage complex, non-linear systems.