# lect2 - AMSC/CMSC 660 Scientific Computing I Fall 2006...

• Notes
• PresidentHackerCaribou10582
• 25

This preview shows pages 1–4. Sign up to view the full content.

AMSC/CMSC 660 Scientific Computing I Fall 2006 Dense Matrix Computations Dianne P. O’Leary c 2002,2004, 2006 Goals We’ll consider computations involving dense matrices, those that don’t have a large number of zero elements. We need to 1. be able to efficiently manipulate matrices on computers. 2. be able to choose the right decomposition for a given task. The Plan Matrix manipulation how matrices are stored on computers basic tools for matrix manipulation: the BLAS Matrix decompositions and their uses LU QR Case study: data fitting rank-revealing QR eigendecomposition Case study: matrix stability SVD Case study: solving integral equations Updating decompositions Some tasks to avoid matrix inverse the matrix permanent Jordan canonical form Software 1

This preview has intentionally blurred sections. Sign up to view the full version.

Notation All vectors are column vectors. Matrices are upper case letters; vectors and scalars are lower case. The elements of a matrix or vector will be denoted by subscripted values: the element of A in row i and column j is a ij or A ( i, j ) . The elements of matrices and vectors can be real or complex numbers. I is the identity matrix and e i is the i th unit vector, the i th column of I . B = A T means that B is the transpose of A : b ij = a ji . B = A * means that B is the complex conjugate transpose of A : b ij = ¯ a ji . We’ll also use Matlab notation when convenient. For example, A ( i : j, k : ) denotes the submatrix of A with row entries between i and j and column entries between k and (inclusive), and A (: , 5) denotes column 5 of the matrix A . An orthogonal matrix U satisfies the relation U T U = I . A unitary matrix U satisfies the relation U * U = I . Aside: Quantum computers are implementations of matrix multiplication by a unitary matrix. For any nonsingular matrix X , the matrix XAX - 1 is a similarity transform of A . Matrix manipulation See Chapter 3. How matrices are stored on computers It turns out that programmers of matrix algorithms need to design their algorithms based on how matrices are stored. We’ll illustrate the idea using a simple algorithm, matrix-vector product . Matrix-vector multiplication Suppose we have an m × n matrix A and an n × 1 vector x , and we wish to form y = Ax . 2
The vector y is defined by dot products between rows of A and x : y i = A ( i, :) * x . Expressed element-by-element, the algorithm is [m,n]=size(A); y = zeros(m,1); for i=1:m, for j=1:n, y(i) = y(i) + A(i,j)*x(j); end end We can also express Ax in a column-oriented way, using saxpy s: Ax = x (1) * A (: , 1) + x (2) * A (: , 2) + . . . + x ( n ) * A (: , n ) . This can be implemented element-by-element as [m,n]=size(A); y = zeros(m,1); for j=1:n, for i=1:m, y(i) = y(i) + A(i,j)*x(j); end end What difference does it make? Both algorithms take the same number of numeric operations : mn multiplications and mn additions.

This preview has intentionally blurred sections. Sign up to view the full version.

This is the end of the preview. Sign up to access the rest of the document.
• Fall '06
• oleary

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern