In order to analyse and correct the measurement errors of a large flat mirror's surface profile by using a scanning pentaprism, the changes of the output light's angles with the pentaprism rotation are analysed and calculated accurately. First, a suitable coordinate system is built and the signs of angles are fixed. Then, the input light vector is calculated from the input light's yaw angle and pitch angle. The function matrix of the pentaprism and the coordinate transformation matrix are introduced. The whole process of the pentaprism rotation is analysed in detail and the output light vector is calculated on the basis of above. Then the output light's yaw angle and pitch angle are calculated. The output light's yaw angle and pitch angle without pentaprism rotation are calculated. Last, the changes of the output light's yaw angle and pitch angle are calculated. The situation is analysed specially when the input light is perpendicular incident into the pentaprism. The actual calculation and experiment are carried out and some disciplinarians of the changes of the output light's angles are summarized. The calculation data are compared with the experiment data, and the largest deviation is 1" which is within the range of experiment accuracy, indicating that the calculation method is right.