The solution of systems of linear equations forms the basis of many techniques in applied mathematics and statistics, so numerical linear algebra forms perhaps the most important set of tools in scientific programming. MATLAB has been developed specifically to handle matrix and vector operations (hence its name – a portmanteau of ‘matrix’ and ‘laboratory’). It has some particularly efficient and effective inbuilt commands to enable the easy manipulation of matrices and vectors, and very straightforward solutions of linear systems (and hence of nonlinear systems).
The aim of this unit is to show you how to use the inbuilt functionality to manipulate vectors and matrices and to solve the linear system $A\mathbf{x}=\mathbf{b}$
.
More importantly, you will see which methods are appropriate in which situation.
The unit begins with a walkthrough of the basics of matrix manipulation in MATLAB which will give you a good introduction to its inbuilt functionality.
There are some exercises at the end to test your understanding.
The second half of the unit is concerned with the solution of the linear system $A\mathbf{x}=\mathbf{b}$
, and will require you to use the basic commands you learned in the first half in order to solve some typical linear systems that arise in solving partial differential equations.
(Note: You will not need to understand where the linear systems come from, but they are from a ‘real world problem’ so they will give you an insight into the power of MATLAB.)
This unit assumes you are already familiar with manipulating vectors and matrices, and with concepts such as eigenvalues and determinants. This material is covered at A level and in the first year of undergraduate mathematics degrees, so any introductory linear algebra book will contain the material. Some examples are listed below.
There are many undergraduate texts on linear algebra, which are mainly theoretical. One that is particularly recommended is Linear Algebra and its Applications by Gilbert Strang. Again, all ideas will be introduced where they are needed, and references will be given.