Inverse kinematics is a major problem in robotics and computer animation. This problem does not always have a unique solution, and sometimes there may not be any solution at all. The forward relations for kinematics are generally complex, which makes it difficult to determine their inverse relation mathematically. In other words, there is no closed form solution for such problems. In this thesis we solve the inverse kinematics for a manipulator with six links and six variable joints where the position and orientation of the end-effector are the output and the joint angles are the input. We have used an approach based on decomposition of output space into cells, with the input space correspondingly divided into regions. Solutions are identified using a clustering method in which the relationships between data in an output cell and clusters in the corresponding input region are modeled by simple polynomials. The method has been implemented and evaluated for accuracy, and compared with other methods for solving inverse kinematics problem. The results show that the proposed method is fast and accurate in finding all the solutions, when they exist.