Section 1.1 Matrix Multiplication, Flop Counts and Block (Partitioned) Matrices
Section 1.1 Matrix Multiplication, Flop Counts and Block (Partitioned) Matrices
Read the examples in the textbook regarding flop counts for doing a matrix/vector
multiplication and for the multiplication of two matrices.
1
For example, the flop count for the multiplication of two n n matrices is 2n 3
flops. Using the big-O notation, this means that matrix multiplication is an O(n 3 )
operation. However, it is common when giving flop counts for algorithms in numerical
linear algebra to include the constant in the term with the highest power of n. For
example, the flop count for the Gaussian elimination algorithm for solving a system of n
linear equations in n unknowns is a polynomial in n, namely
2 3 3 2 7
n + n n .
3 2 6
Thus, although this is an O(n 3 ) flop count, it is more common to state that the Gaussian
2
elimination algorithm requires about n 3 flops. This is a good estimate for large values
3
of n, which is why the lower order terms in n are ignored.
One common use of a flop count is to estimate the relative execution time of an
algorithm for problems of different sizes. See Exercises 1.1.8 and 1.1.9 on page 5.
s
Then B = AX if and only if Bij = Aik X kj , for 1 i r , 1 j t.
k =1
2
EXAMPLE
B = AX
Partitioning into blocks does not affect the total flop count of an algorithm, but it
can greatly affect its performance. Read pages 10-11 with regard to transferring data
from main memory and parallel processing.
For a more extensive discussion, see Section 1.3 of Golub and Van Loan (which
includes, e.g., fast matrix multiplication based on block matrix multiplication).
SECTION 1.2
Notation for a system of n linear equations in n unknowns:
Ax = b
or
a11 x1 + a12 x 2 + L + a1n x n = b1
a 21 x1 + a 22 x 2 + L + a 2 n x n = b2
M
a n1 x1 + a n 2 x 2 + L + a nn x n = bn
3
For any square matrix A, the following conditions are equivalent:
A 1 exits
there is no nonzero vector y such that Ay = 0
the column vectors of A are linearly independent
the row vectors of A are linearly independent
det( A) 0
given any vector b, there is exactly one vector x such that Ax = b
Several examples of problems in which systems of linear equations arise are given on
pages 13-19. Note that in some of these examples, the coefficient matrix A is sparse (see
page 21). Sparse matrices are discussed in Sections 1.6, 1.7 and 1.9.