We will illustrate many of the ideas in this course by calling on basic
matrix-by-vector multiplication, the real workhorse of scientific computing. We
begin by illustrating this multiplication in the context of
an iterative method to solve a basic
equation in linear algebra.
Consider the vector
, and
the NXN matrix
. Given a fixed right-hand-side vector
, solve the equation
One approach to doing this is the so-called Jacobi iteration method. Begin with an
initial guess at the solution, lets call it
. Break A up into three pieces,
A=D+L+U, where D is the diagonal, and U and L are, respectively, the upper- and
lower-triangular parts of A. Successive iterations
, etc are computed
by the iteration
Think about the calculations involved in obtaining the right-hand-side. There is
multiplication by a matrix (at least almost all of a matrix), addition of a vector,
and division. If A is "full", then the L+U multiplication requires
operations,
and experience shows this method - even on modern architectures - is not
cost-effective. However if A is sparse, then the matrix multiplication by L+U
involves only O(N) multiplies, and on distributed memory machines, Jacobi iteration
can be a useful tool. We will flesh out these ideas during the course of the semester.
For now, as we begin by talking about computer architectures, i want you to start coding this simple solver. It will be used, modified, generalized several times. So write modularly and well.