Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization...

27
Lecture 8: Fast Linear Solvers (Part 3) 1

Transcript of Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization...

Page 1: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Lecture 8: Fast Linear Solvers (Part 3)

1

Page 2: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Cholesky Factorization

โ€ข Matrix ๐ด is symmetric if ๐ด = ๐ด๐‘‡.

โ€ข Matrix ๐ด is positive definite if for all ๐’™ โ‰  ๐ŸŽ, ๐’™๐‘‡๐‘จ๐’™ > 0.

โ€ข A symmetric positive definite matrix ๐ด has Cholesky factorization ๐ด = ๐ฟ๐ฟ๐‘‡, where ๐ฟ is a lower triangular matrix with positive diagonal entries.

โ€ข Example.

โ€“ ๐ด = ๐ด๐‘‡ with ๐‘Ž๐‘–๐‘– > 0 and ๐‘Ž๐‘–๐‘– > |๐‘Ž๐‘–๐‘—|๐‘—โ‰ ๐‘– is positive definite.

2

Page 3: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

๐ด =

๐‘Ž11 ๐‘Ž12 โ€ฆ ๐‘Ž1๐‘›๐‘Ž12 ๐‘Ž22 โ€ฆ ๐‘Ž2๐‘›โ‹ฎ

๐‘Ž1๐‘›

โ‹ฎ๐‘Ž2๐‘›

โ‹ฑโ€ฆ

โ‹ฎ๐‘Ž๐‘›๐‘›

=

๐‘™11 0 โ€ฆ 0๐‘™21 ๐‘™22 โ€ฆ 0โ‹ฎ๐‘™๐‘›1

โ‹ฎ๐‘™๐‘›2

โ‹ฑโ€ฆ

โ‹ฎ๐‘™๐‘›๐‘›

๐‘™11 ๐‘™21 โ€ฆ ๐‘™๐‘›10 ๐‘™22 โ€ฆ ๐‘™๐‘›2โ‹ฎ0

โ‹ฎ0

โ‹ฑโ€ฆ

โ‹ฎ๐‘™๐‘›๐‘›

3

Page 4: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

In 2 ร— 2 matrix size case ๐‘Ž11 ๐‘Ž21๐‘Ž21 ๐‘Ž22

=๐‘™11 0๐‘™21 ๐‘™22

๐‘™11 ๐‘™210 ๐‘™22

๐‘™11 = ๐‘Ž11; ๐‘™21 = ๐‘Ž21/๐‘™11; ๐‘™22 = ๐‘Ž22 โˆ’ ๐‘™212

4

Page 5: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Submatrix Cholesky Factorization Algorithm

5

for ๐‘˜ = 1 to ๐‘› ๐‘Ž๐‘˜๐‘˜ = ๐‘Ž๐‘˜๐‘˜ for ๐‘– = ๐‘˜ + 1 to ๐‘› ๐‘Ž๐‘–๐‘˜ = ๐‘Ž๐‘–๐‘˜/๐‘Ž๐‘˜๐‘˜ end for ๐‘— = ๐‘˜ + 1 to ๐‘› // reduce submatrix for ๐‘– = ๐‘— to ๐‘› ๐‘Ž๐‘–๐‘— = ๐‘Ž๐‘–๐‘— โˆ’ ๐‘Ž๐‘–๐‘˜๐‘Ž๐‘—๐‘˜

end end end

Equivalent to ๐‘Ž๐‘–๐‘˜๐‘Ž๐‘˜๐‘— due

to symmetry

Page 6: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

6

Remark:

1. This is a variation of Gaussian Elimination algorithm.

2. Storage of matrix ๐ด is used to hold matrix ๐ฟ .

3. Only lower triangle of ๐ด is used (See ๐‘Ž๐‘–๐‘— = ๐‘Ž๐‘–๐‘— โˆ’ ๐‘Ž๐‘–๐‘˜๐‘Ž๐‘—๐‘˜).

4. Pivoting is not needed for stability.

5. About ๐‘›3/6 multiplications and about ๐‘›3/6 additions are required.

Data Access Pattern

Read only

Read and write

Page 7: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Column Cholesky Factorization Algorithm

7

for ๐‘— = 1 to ๐‘› for ๐‘˜ = 1 to ๐‘— โˆ’ 1 for ๐‘– = ๐‘— to ๐‘› ๐‘Ž๐‘–๐‘— = ๐‘Ž๐‘–๐‘— โˆ’ ๐‘Ž๐‘–๐‘˜๐‘Ž๐‘—๐‘˜

end end ๐‘Ž๐‘—๐‘— = ๐‘Ž๐‘—๐‘—

for ๐‘– = ๐‘— + 1 to ๐‘› ๐‘Ž๐‘–๐‘— = ๐‘Ž๐‘–๐‘—/๐‘Ž๐‘—๐‘—

end end

Page 8: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Data Access Pattern

8

Read only

Read and write

Page 9: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Parallel Algorithm

โ€ข Parallel algorithms are similar to those for LU factorization.

9

References โ€ข X. S. Li and J. W. Demmel, SuperLU_Dist: A scalable

distributed-memory sparse direct solver for unsymmetric linear systems, ACM Trans. Math. Software 29:110-140, 2003

โ€ข P. Hรฉnon, P. Ramet, and J. Roman, PaStiX: A high-performance parallel direct solver for sparse symmetric positive definite systems, Parallel Computing 28:301-321, 2002

Page 10: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

QR Factorization and HouseHolder Transformation

Theorem Suppose that matrix ๐ด is an ๐‘š ร— ๐‘› matrix with linearly independent columns, then ๐ด can be factored as ๐ด = ๐‘„๐‘…

where ๐‘„ is an ๐‘š ร— ๐‘› matrix with orthonormal columns and ๐‘… is an invertible ๐‘› ร— ๐‘› upper triangular matrix.

10

Page 11: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

QR Factorization by Gram-Schmidt Process

Consider matrix ๐ด = [๐’‚1 ๐’‚2 โ€ฆ |๐’‚๐‘›]

Then,

๐’–1 = ๐’‚1, ๐’’1 =๐’–1

||๐’–1||

๐’–2 = ๐’‚2 โˆ’ (๐’‚2 โˆ™ ๐’’1)๐’’1, ๐’’2 =๐’–2

||๐’–2||

โ€ฆ

๐’–๐‘˜ = ๐’‚๐‘˜ โˆ’ ๐’‚๐‘˜ โˆ™ ๐’’1 ๐’’1 โˆ’โ‹ฏโˆ’ ๐’‚๐‘˜ โˆ™ ๐’’๐‘˜โˆ’1 ๐’’๐‘˜โˆ’1, ๐’’๐‘˜ =๐’–๐‘˜

||๐’–๐‘˜||

๐ด = ๐’‚1 ๐’‚2 โ€ฆ ๐’‚๐‘›

= ๐’’1 ๐’’2 โ€ฆ ๐’’๐‘›

๐’‚1 โˆ™ ๐’’1 ๐’‚2 โˆ™ ๐’’1 โ€ฆ ๐’‚๐‘› โˆ™ ๐’’1

0 ๐’‚2 โˆ™ ๐’’2 โ€ฆ ๐’‚๐‘› โˆ™ ๐’’2

โ‹ฎ โ‹ฎ โ‹ฑ โ‹ฎ0 0 โ€ฆ ๐’‚๐‘› โˆ™ ๐’’๐‘›

= ๐‘„๐‘…

11

Page 12: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Classical/Modified Gram-Schmidt Process

for j=1 to n

๐’–๐‘— = ๐’‚๐‘—

for i = 1 to j-1

๐‘Ÿ๐‘–๐‘— = ๐’’๐‘–

โˆ—๐’‚๐‘— (๐ถ๐‘™๐‘Ž๐‘ ๐‘ ๐‘–๐‘๐‘Ž๐‘™)

๐‘Ÿ๐‘–๐‘— = ๐’’๐‘–โˆ—๐’–๐‘— (๐‘€๐‘œ๐‘‘๐‘–๐‘“๐‘–๐‘’๐‘‘)

๐’–๐‘— = ๐’–๐‘— โˆ’ ๐‘Ÿ๐‘–๐‘—๐’’๐‘–

endfor

๐‘Ÿ๐‘—๐‘— = ||๐’–๐‘—||2

๐’’๐‘— = ๐’–๐‘—/๐‘Ÿ๐‘—๐‘—

endfor 12

Page 13: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Householder Transformation

Let ๐‘ฃ โˆˆ ๐‘…๐‘› be a nonzero vector, the ๐‘› ร— ๐‘› matrix

๐ป = ๐ผ โˆ’ 2๐’—๐’—๐‘‡

๐’—๐‘‡๐’—

is called a Householder transformation (or reflector).

โ€ข Alternatively, let ๐’– = ๐’—/||๐’—||, ๐ป can be rewritten as

๐ป = ๐ผ โˆ’ 2๐’–๐’–๐‘‡.

Theorem. A Householder transformation ๐ป is symmetric and orthogonal, so ๐ป = ๐ป๐‘‡ = ๐ปโˆ’1.

13

Page 14: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

1. Let vector ๐’› be perpendicular to ๐’—.

๐ผ โˆ’ 2๐’—๐’—๐‘‡

๐’—๐‘‡๐’—๐’› = ๐’› โˆ’ 2

๐’—(๐’—๐‘‡๐’›)

๐’—๐‘‡๐’—= ๐’›

2. Let ๐’– =๐’—

| ๐’— |. Any vector ๐’™ can be written as

๐’™ = ๐’› + ๐’–๐‘‡๐’™ ๐’–. ๐ผ โˆ’ 2๐’–๐’–๐‘‡ ๐’™ = ๐ผ โˆ’ 2๐’–๐’–๐‘‡ ๐’› + ๐’–๐‘‡๐’™ ๐’– = ๐’› โˆ’ ๐’–๐‘‡๐’™ ๐’–

14

Page 15: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

โ€ข Householder transformation is used to selectively zero out blocks of entries in vectors or columns of matrices.

โ€ข Householder is stable with respect to round-off error.

15

Page 16: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

For a given a vector ๐’™, find a Householder

transformation, ๐ป, such that ๐ป๐’™ = ๐‘Ž

10โ‹ฎ0

= ๐‘Ž๐’†1

โ€“ Previous vector reflection (case 2) implies that vector ๐’– is in parallel with ๐’™ โˆ’ ๐ป๐’™.

โ€“ Let ๐’— = ๐’™ โˆ’ ๐ป๐’™ = ๐’™ โˆ’ ๐‘Ž๐’†1, where ๐‘Ž = ยฑ| ๐’™ | (when the arithmetic is exact, sign does not matter).

โ€“ ๐’– = ๐’—/|| ๐’—||

โ€“ In the presence of round-off error, use

๐’— = ๐’™ + ๐‘ ๐‘–๐‘”๐‘› ๐‘ฅ1 | ๐’™ |๐’†1

to avoid catastrophic cancellation. Here ๐‘ฅ1 is the first entry in the vector ๐’™.

Thus in practice, ๐‘Ž = โˆ’๐‘ ๐‘–๐‘”๐‘› ๐‘ฅ1 | ๐’™ | 16

Page 17: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Algorithm for Computing the Householder Transformation

17

๐‘ฅ๐‘š = max { ๐‘ฅ1 , ๐‘ฅ2 , โ€ฆ , ๐‘ฅ๐‘› } for ๐‘˜ = 1 to ๐‘› ๐‘ฃ๐‘˜ = ๐‘ฅ๐‘˜/๐‘ฅ๐‘š end

๐›ผ = ๐‘ ๐‘–๐‘”๐‘›(๐‘ฃ1)[๐‘ฃ12 + ๐‘ฃ2

2 +โ‹ฏ+ ๐‘ฃ๐‘›2]1/2

๐‘ฃ1 = ๐‘ฃ1 + ๐›ผ ๐›ผ = โˆ’๐›ผ๐‘ฅ๐‘š ๐’– = ๐’—/| ๐’— |

Remark: 1. The computational complexity is ๐‘‚(๐‘›). 2. ๐ป๐’™ is an ๐‘‚ ๐‘› operation compared to ๐‘‚(๐‘›2) for a general matrix-vector product. ๐ป๐’™ = ๐’™ โˆ’ ๐Ÿ๐’–(๐’–๐‘ป๐’™).

Page 18: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

QR Factorization by HouseHolder Transformation

Key idea:

Apply Householder transformation successively to columns of matrix to zero out sub-diagonal entries of each column.

18

Page 19: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

โ€ข Stage 1 โ€“ Consider the first column of matrix ๐ด and determine a

HouseHolder matrix ๐ป1 so that ๐ป1

๐‘Ž11๐‘Ž21โ‹ฎ

๐‘Ž๐‘›1

=

๐›ผ10โ‹ฎ0

โ€“ Overwrite ๐ด by ๐ด1, where

๐ด1 =

๐›ผ1 ๐‘Ž12โˆ— โ‹ฏ ๐‘Ž1๐‘›

โˆ—

0 ๐‘Ž22โˆ— โ‹ฎ ๐‘Ž2๐‘›

โˆ—

โ‹ฎ โ‹ฎ โ‹ฎ โ‹ฎ0 ๐‘Ž๐‘›2

โˆ— โ‹ฏ ๐‘Ž๐‘›๐‘›โˆ—

= ๐ป1๐ด

Denote vector which defines ๐ป1 vector ๐’—1. ๐’–1 = ๐’—1/| ๐’—1 |

Remark: Column vectors

๐‘Ž12โˆ—

๐‘Ž22โˆ—

โ‹ฎ๐‘Ž๐‘›2โˆ—

โ€ฆ

๐‘Ž1๐‘›โˆ—

๐‘Ž2๐‘›โˆ—

โ‹ฎ๐‘Ž๐‘›๐‘›โˆ—

should be computed by

๐ป๐’™ = ๐’™ โˆ’ ๐Ÿ๐’–(๐’–๐‘ป๐’™). 19

Page 20: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

โ€ข Stage 2 โ€“ Consider the second column of the updated matrix

๐ด โ‰ก ๐ด1 = ๐ป1๐ด and take the part below the diagonal to determine a Householder matrix ๐ป2

โˆ— so that

๐ป2โˆ—

๐‘Ž22โˆ—

๐‘Ž32โˆ—

โ‹ฎ๐‘Ž๐‘›2โˆ—

=

๐›ผ2

0โ‹ฎ0

Remark: size of ๐ป2โˆ— is (๐‘› โˆ’ 1) ร— (๐‘› โˆ’ 1).

Denote vector which defines ๐ป2โˆ— vector ๐’—2. ๐’–2 = ๐’—2/| ๐’—2 |

โ€“ Inflate ๐ป2โˆ— to ๐ป2 where

๐ป2 =1 00 ๐ป2

โˆ—

Overwrite ๐ด by ๐ด2 โ‰ก ๐ป2๐ด1

20

Page 21: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

โ€ข Stage k

โ€“ Consider the ๐‘˜๐‘กโ„Ž column of the updated matrix ๐ด and take the part below the diagonal to determine a Householder matrix ๐ป๐‘˜

โˆ— so that

๐ป๐‘˜โˆ—

๐‘Ž๐‘˜๐‘˜โˆ—

๐‘Ž๐‘˜+1,๐‘˜โˆ—

โ‹ฎ๐‘Ž๐‘›,๐‘›โˆ—

=

๐›ผ๐‘˜

0โ‹ฎ0

Remark: size of ๐ป๐‘˜โˆ— is (๐‘› โˆ’ ๐‘˜ + 1) ร— (๐‘› โˆ’ ๐‘˜ + 1).

Denote vector which defines ๐ป๐‘˜โˆ— vector ๐’—๐‘˜. ๐’–๐‘˜ = ๐’—๐‘˜/| ๐’—๐‘˜ |

โ€“ Inflate ๐ป๐‘˜โˆ— to ๐ป๐‘˜ where

๐ป๐‘˜ =๐ผ๐‘˜โˆ’1 0

0 ๐ป๐‘˜โˆ— , ๐ผ๐‘˜โˆ’1 is (๐‘˜ โˆ’ 1) ร— (๐‘˜ โˆ’ 1) identity matrix.

Overwrite ๐ด by ๐ด๐‘˜ โ‰ก ๐ป๐‘˜๐ด๐‘˜โˆ’1

21

Page 22: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

โ€ข After (๐‘› โˆ’ 1) stages, matrix ๐ด is transformed into an upper triangular matrix ๐‘….

โ€ข ๐‘… = ๐ด๐‘›โˆ’1 = ๐ป๐‘›โˆ’1๐ด๐‘›โˆ’2 = โ‹ฏ =๐ป๐‘›โˆ’1๐ป๐‘›โˆ’2โ€ฆ๐ป1๐ด

โ€ข Set ๐‘„๐‘‡ = ๐ป๐‘›โˆ’1๐ป๐‘›โˆ’2โ€ฆ๐ป1. Then ๐‘„โˆ’1 = ๐‘„๐‘‡. Thus ๐‘„ = ๐ป1

๐‘‡๐ป2๐‘‡ โ€ฆ๐ป๐‘›โˆ’1

๐‘‡

โ€ข ๐ด = ๐‘„๐‘…

22

Page 23: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Example. ๐ด =1 11 21 3

.

Find ๐ป1 such that ๐ป1

111

=๐›ผ100

.

By ๐‘Ž = โˆ’๐‘ ๐‘–๐‘”๐‘› ๐‘ฅ1 | ๐’™ |,

๐›ผ1 = โˆ’ 3 = โˆ’1.721.

๐‘ข1 = 0.8881, ๐‘ข2 = ๐‘ข3 = 0.3250.

By ๐ป๐’™ = ๐’™ โˆ’ ๐Ÿ๐’– ๐’–๐‘ป๐’™ , ๐ป1

123

=โˆ’3.46410.36611.3661

๐ป1๐ด =โˆ’1.721 โˆ’3.4641

0 0.36610 1.3661

23

Page 24: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Find ๐ป2โˆ— and ๐ป2, where

๐ป2โˆ— 0.36611.3661

=๐›ผ2

0

So ๐›ผ2 = โˆ’1.4143, ๐’–2 =0.79220.6096

So ๐‘… = ๐ป2๐ป1๐ด =โˆ’1.7321 โˆ’3.4641

0 โˆ’1.41430 0

๐‘„ = (๐ป2๐ป1)๐‘‡= ๐ป1

๐‘‡๐ป2๐‘‡

=โˆ’0.5774 0.7071 โˆ’0.4082โˆ’0.5774 0 0.8165โˆ’0.5774 โˆ’0.7071 โˆ’0.4082

24

Page 25: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

๐ด๐’™ = ๐’ƒ โ‡’ ๐‘„๐‘…๐’™ = ๐’ƒ

โ‡’ ๐‘„๐‘‡๐‘„๐‘…๐’™ = ๐‘„๐‘‡๐’ƒ โ‡’ ๐‘…๐’™ = ๐‘„๐‘‡๐’ƒ

Remark: Q rarely needs explicit construction

25

Page 26: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

Parallel Householder QR

โ€ข Householder QR factorization is similar to Gaussian elimination for LU factorization.

โ€“ Additions + multiplications: ๐‘‚4

3๐‘›3 for QR versus

๐‘‚2

3๐‘›3 for LU

โ€ข Forming Householder vector ๐’—๐‘˜is similar to computing multipliers in Gaussian elimination.

โ€ข Subsequent updating of remaining unreduced portion of matrix is similar to Gaussian elimination.

โ€ข Parallel Householder QR is similar to parallel LU. Householder vectors need to broadcast among columns of matrix.

26

Page 27: Lecture 8: Fast Linear Solvers (Part 3)zxu2/acms60212-40212/Lec-09-3.pdfCholesky Factorization โ€ขMatrix ๐ด is symmetric if ๐ด=๐ด๐‘‡. โ€ขMatrix ๐ด is positive definite if

References

โ€ข M. Cosnard, J. M. Muller, and Y. Robert. Parallel QR decomposition of a rectangular matrix, Numer. Math. 48:239-249, 1986

โ€ข A. Pothen and P. Raghavan. Distributed orthogonal factorization: Givens and Householder algorithms, SIAM J. Sci. Stat. Comput. 10:1113-1134, 1989

27