This paper introduces a hand gesture recognition method for human computer interface. This recognition method is based on learning to rank model. The experimental results show that the AdaRank model is effective for improving the recognition accuracy. Combining the learning to rank model with trajectory of hand motion approaches, a breakthrough is made to model a complex combination of eight recognized hand gestures. The hand gesture recognition system is built to detect gestures with single hand or both hands moving in basic directions, such as moving upward, moving downward, moving leftward, and moving rightward, efficiently. For the purpose of being more user friendly of the proposed system, the basic directions can be combined and extended into more hand gestures for applications. The experimental results show that our proposed method has high performance and can be run in real-time. The accuracy of the method is also high for real applications.