© 2020, The Brazilian Society of Mechanical Sciences and Engineering.Line following robots have ability to track a given path autonomously using feedback mechanisms. The path is usually a black line on a white surface or a white line on a black surface. Today, line following robots are used in medical, industrial and automotive industries. Therefore, the studies on the line following robots have been increased recently. In this study, a robust, non-chattering sliding mode control (SMC) is designed and applied for a line following robot. The mobile robot is designed to sense the straight or curved path with its infrared sensors mounted on the robot. Therefore, these infrared sensors provide continuous streaming of the defined path to guide or direct changes in robot by activating motors on right wheel or/and left wheel. The control strategy is curial to track complex paths accurately and to have a fast, stable and accurate line following robot. Thus, for comparison, conventional proportional-integral-derivative (PID) is also applied to robot. The main purpose of this study is to investigate performance of sliding mode control during path tracking. For this, numerical solution and experimental study were carried out. From the results, it was understood that sliding mode controller is highly efficient in tracking the path.