This paper presents mathematical model and robust control design for Inverted Flexible Beam (IFB) on cart system. Firstly, the system of IFB on cart is modeled using energy approach. Flexibility of beam is accounted by assuming spring connected imaginary structure. Proposed model is simulated and validated with experimental results. Secondly, a robust Sliding Mode Control (SMC) is developed to stabilize the beam vertically on the cart, despite the action of uncertainties and disturbances on the system. A stable sliding surface is formulated and using Gao's reaching law, sliding mode control input is synthesized for the cart. By feeding suitable controlled motion to the cart, IFB is stabilized and the flexibility vibrations are also eliminated com pletely. The performance of SMC is compared with Proportional Integral Derivative (PID) control. Accuracy, robustness, speed and superiority of designed SMC is demonstrated in simulations.