MATLAB is a popular scientific and engineering calculation software in the world. The course of linear algebra is an important basic course in university education. The combination of MATLAB software and linear algebra teaching can greatly simplify the process and steps of calculation, improve the efficiency of calculation and stimulate students' interest in learning. According to the author's own teaching experience, this paper expounds in detail the application of MATLAB in the teaching of linear algebra.