Haptic devices play an important role in haptic applications. Light Weight Robot III is the latest version of DLR light weight robot. It has seven Degree of Freedom (DoF) with only 14 kg self weight. Seven torque sensors mounted on its joints and one 6 DoF force-torque sensor on the end-effector enable it to precisely sense the external forces. Existing inverse kinematics library is design for a general model of Light Weight Robot III, which is slightly dierent from the one used as haptic device. This thesis is intended to adapt and optimize this inverse kinematics library for the haptic applications of Light Weight Robot III. It describes the adaptation of the inverse kinematics library to the hardware, which conquered the problems caused by the different configuration of the robot used as haptic device. It realized the null space movement of the robot, which enables the position changing of the intermediate joints due to applied force on it. At last it gives a solution for detecting and avoiding the singular configurations of the robot, which is especial important due to unpredictable trajectory of the end-eector. The simulation and experiment results of improved kinematics library are also shown in this thesis.