Docsity

Matrix Operations and Linear Systems, Slides of Operating Systems

Toggle sidebar
bg1
REVIEW SLIDES
Review slides
DISCLAIMER! This is only a partial list of important topics
to review – it is in no way representative of all material seen
so far in the course.
NOTE: The exam will test you on theoretical aspects and
your overall understanding of the class so far. You will
not have questions on matlab nor will you be asked to
give detailed descriptions of algorithms.. (These are left to
homeworks)
NOTE: No calculators – [this means no big calculations
to be expected]
G-2
Solving systems of equations
Equations. Understand how equations are translated into
matrix form.
äOperations permitted (adding rows, swapping, * scalar)
Gaussian Eliminations : Puts [A, b]into upper triangular
form. Review how the algorithm works.
Gauss-Jordan: Puts [A, b]into diagonal form
äGaussian Elimination with pivoting [with interchange]
Always swap current row with one having largest entry in
column kbelow akk.
äConsistent and Inconsistent systems
G-3
Computational Costs: [count both * and +]
For a system with nequations and nunknowns (’an n×n
system’) :
äTriangular system: C(n) = n2
äGauss: C(n)≈2
3n3
äGauss-Jordan C(n)≈n3
Remember: Gauss-Jordan costs 50% more than Gaussian
Elimination
G-4
Docsity.com
pf3
pf4
pf5
pf8

Partial preview of the text

Download Matrix Operations and Linear Systems and more Slides Operating Systems in PDF only on Docsity!

REVIEW SLIDES

Review slides DISCLAIMER! This is only a partial list of important topics to review – it is in no way representative of all material seen so far in the course.

NOTE: The exam will test you on theoretical aspects and your overall understanding of the class so far. You will not have questions on matlab nor will you be asked to give detailed descriptions of algorithms.. (These are left to homeworks) NOTE: No calculators – [this means no big calculations to be expected]

G-

Solving systems of equations

Equations. Understand how equations are translated into matrix form.

ä Operations permitted (adding rows, swapping, * scalar)

Gaussian Eliminations : Puts [A, b] into upper triangular form. Review how the algorithm works.

Gauss-Jordan: Puts [A, b] into diagonal form

ä Gaussian Elimination with pivoting [with interchange] Always swap current row with one having largest entry in column k below akk.

ä Consistent and Inconsistent systems

Computational Costs: [count both * and +] For a system with n equations and n unknowns (’an n × n system’) : ä Triangular system: C(n) = n^2 ä Gauss: C(n) ≈ 23 n^3 ä Gauss-Jordan C(n) ≈ n^3 Remember: Gauss-Jordan costs 50% more than Gaussian Elimination

Vectors - vector equations

ä What is Rn^?

ä Addition of vectors [components are added]

ä Multiplication by a scalar [components are multiplied by the scalar]

ä Understand geometric representation of addition, scal- ing.

ä Linear combinations : x = α 1 x 1 + α 2 x 2 + · · · + αmxm

ä The linear span of a set of vectors v 1 , v 2 , · · · , vp: the set of all possible linear combinations of the vectors v 1 , v 2 , · · · , vp.

G-

The echelon form and applications

Standard Echelon Form: ä Each is a nonzero (leading) entry. ä A ∗ can be a non-zero or a zero entry.

ä Each is called a pivot ä Each column containing a is a pivot column. ä This form is calculated by a variation of Gaussian Elim- ination with pivoting

G-

Reduced Row Echelon Form [rref]

    

ä Pivots and pivot columns are again indicated by squares.

ä This form is calculated by a variation of Gauss-Jordan elimination with poviting

ä It is unique [The standard row echelon form is not]

Application: general solutions of linear systems

ä Reduce augmented system [A, b] to the re- duced echelon form. ä Result is something like:

ä Variables associated with columns are called basic. ä The other variables are called free. To get general solution: treat free variables as parameters Solve for the other ones in terms of these free variables.

Linear Mappings

ä A mapping is a transformation which gives you a certain vector y = T (x) for any input vector x

ä Linear vs. Nonlinear mappings

ä For any matrix m × n matrix A, the transformation y = Ax (matrix-vector product) is a linear mapping ..

ä ... from Rn^ to Rm

Any linear mapping can be represented as a matrix-vector product with a certain matrix A

G-

ä A mapping is onto if (definition) for any y in the image space (Rm) there is at least one x in the domain space (Rn) such that T (x) = y ä another term used: surjective ä A mapping is one to one if (definition) for any y in the image space there can be at most one x in the domain space such that T (x) = y ä another term used: injective ä Let A be an m × n matrix. The mapping x → y = Ax is onto:

  • iff the system Ax = y admits a solution for any y ∈ Rm
  • iff the span of the columns of A equals Rm
  • iff the rref of A has a pivot in each row

G-

The mapping x → y = Ax is one-to-one:

  • iff the system Ax = 0 admits only the trivial solution
  • iff the columns of A are linearly independent

G-

MATRIX OPERATIONS [2.1]

Docsity.com

Matrix operations

ä If A is an m × n matrix (m rows and n columns) – then the scalar entry in the ith row and jth column of A is denoted by aij and is called the (i, j)-entry of A.

Column j ↓

Row i →

a 11 · · · a 1 j · · · a 1 n ... ... ... ai 1 · · · aij · · · ain ... ... ... am 1 · · · amj · · · amn

= A

a 1 aj an G-

ä The number aij is the ith entry (from the top) of the jth column ä Each column of A is a list of m real numbers, which identifies a vector in Rm^ called a column vector ä The columns are denoted by a 1 , ..., an, and the matrix A is written as A = [a 1 , a 2 , · · · , an]

G-

ä The diagonal entries in an m×n matrix A are a 11 , a 22 , a 33 , ..., and they form the main diagonal of A.

ä A diagonal matrix is a matrix whose nondiagonal entries are zero

ä An important example is the n × n identity matrix, In (each diagonal entry equals one) - Example:

I 3 =

ä Another important matrix is the zero matrix (all entries are 0). It is denoted by O.

Equality of two matrices: Two matrices A and B are equal if they have the same size (they are both m × n) and if their entries are all the same. aij = bij for all i = 1, · · · , m, j = 1, · · · , n

Sum of two matrices: If A and B are m × n matrices, then their sum A + B is the m × n matrix whose entries are the sums of the corresponding entries in A and B. ä If we call C this sum we can write: cij = aij + bij for all i = 1, · · · , m, j = 1, · · · , n

  • [ 4 0 5 1 3 2

]

[

]

[

]

[

]

Definition: If A is an m × n matrix, and if B is an n × p matrix with columns b 1 , · · · , bp, then the product AB is the matrix whose p columns are Ab 1 , · · · , Abp. ä That is, AB = A[b 1 , b 2 , · · · , bp] = [Ab 1 , Ab 2 , · · · , Abp]

ä Important:

Multiplication of matrices corresponds to composition of linear transformations.

  • Operation count: How many operations are required to perform product AB?

G-

  • Compute AB when

A =

[

]

B =

[

]

  • Compute AB when

A =

 B^ =

  • Can you compute AB when

A =

[

]

B =

G-

Row-wise matrix product

ä Recall what we did with matrix-vector product to com- pute a single entry of the vector Ax

ä Can we do the same thing here? i.e., How can we com- pute the entry cij of the product AB without computing entire columns?

  • Do this to compute entry (2, 2) in the first example above.
  • Operation counts: Is more or less expensive to perform the matrix-vector product row-wise instead of column-wise?

Properties of matrix multiplication

Theorem Let A be an m × n matrix, and let B and C have sizes for which the indicated sums and products are defined.

  • A(BC) = (AB)C (associative law of multiplication)
  • A(B + C) = AB + AC (left distributive law)
  • (B + C)A = BA + CA (right distributive law)
  • r(AB) = (rA)B = A(rB) for any scalar r
  • ImA = AIn = A (product with identity)
  • If AB = AC then B = C (’simplification’) : True- False?
  • If AB = 0 then either A = 0 or B = 0 : True or False?
  • AB = BA : True or false??

G-

Square matrices. Matrix powers

ä Important particular case when n = m - so matrix is n × n ä In this case if x is in Rn^ then y = Ax is also in Rn ä AA is also a square matrix and will be denoted by A^2 ä More generally, the matrix Ak^ is the matrix which is the product of k copies of A: A^1 = A; A^2 = AA; · · · Ak^ = A︸ · · ·︷︷ A︸ k times ä For consistency define A^0 to be the identity: A^0 = In,

  • Al^ × Ak^ = Al+k^ – Also true when k or l is zero.

G-

Transpose of a matrix

Given an m × n matrix A, the transpose of A is the n × m matrix, denoted by AT^ , whose columns are formed from the corresponding rows of A.

Theorem : Let A and B denote matrices whose sizes are appropriate for the following sums and products.

  • (AT^ )T^ = A
  • (A + B)T^ = AT^ + BT
  • (αA)T^ = αAT^ for any scalar α
  • (AB)T^ = BT^ AT

G-31 Docsity.com