The interaction matrix of an adaptive optical system is directly computed. In this method, based on the correlation between the measured and theoretical slope influence vectors of the selected actuators, the misalignment between the wavefront sensor and wavefront corrector is first estimated, and then an interaction matrix more close to the real one is obtained. Experimental results show that with considering the misalignment, the interaction matrix acquired by direct computation becomes more effective in closed-loop correction, and the slope residual error is reduced.