Graphics 2014 Linear Algebra II Linear Maps & Matrices Linear - - PowerPoint PPT Presentation

โ–ถ
graphics 2014
SMART_READER_LITE
LIVE PREVIEW

Graphics 2014 Linear Algebra II Linear Maps & Matrices Linear - - PowerPoint PPT Presentation

Graphics 2014 Linear Algebra II Linear Maps & Matrices Linear Maps & Matrices CORE core topics important Linear Combinations x 1 2x 2 + x 1 = x 2 =1 Linear Combinations Algebra Linear Combinations


slide-1
SLIDE 1

Graphics 2014

Linear Algebra II

Linear Maps & Matrices

slide-2
SLIDE 2

core topics important

CORE

Linear Maps & Matrices

slide-3
SLIDE 3

Linear Combinations

Linear Combinations as Mappings

  • Fix vectors ๐ฒ1, โ€ฆ , ๐ฒ๐‘œ โˆˆ โ„๐‘›.
  • Factors ฮป1, โ€ฆ , ฮป๐‘œ โ†’ ๐ณ

x1 Linear Combinations x2 2x2 + x1

๐ณ = ฮป๐‘—๐ฒ๐‘—

๐‘œ ๐‘—=1 Algebra

slide-4
SLIDE 4

Linear Mappings

Linear Map

  • Fix vectors

๐ฒ1, โ€ฆ , ๐ฒ๐‘œ โˆˆ โ„๐‘›

  • Input coordinates

ฮป1, โ€ฆ , ฮป๐‘œ

  • Output vector

๐ณ โˆˆ โ„๐‘›

Linear Combinatio tion

ฮป1 โ‹ฏ ฮป๐‘œ

fixed: x1,โ€ฆ , xn

๐ณ = ฮป๐‘—๐ฒ๐‘—

๐‘œ ๐‘—=1

Map ฮป1, โ€ฆ , ฮป๐‘œ โ†’ ๐ณ is called a linear map

๐ณ

slide-5
SLIDE 5

Linear Mappings

Linear Map

  • Fix vectors

๐ฒ1, โ€ฆ , ๐ฒ๐‘œ โˆˆ โ„๐‘›

  • Input coordinates

ฮป1, โ€ฆ , ฮป๐‘œ

  • Output vector

๐ณ โˆˆ โ„๐‘›

Linear Combinatio tion

ฮป1 โ‹ฏ ฮป๐‘œ

fixed: x1,โ€ฆ , xn

๐ณ = ฮป๐‘—๐ฒ๐‘—

๐‘œ ๐‘—=1

Map ฮป1, โ€ฆ , ฮป๐‘œ โ†’ ๐ณ is called a linear map

Input Vectors

๐ณ

slide-6
SLIDE 6

Linear Mappings

Linear Combinatio tion ๐› = ๐œ‡1 โ‹ฎ ฮป๐‘œ

fixed: x1, โ€ฆ , xn โˆˆ โ„๐‘›

๐ณ = ๐‘ง1 โ‹ฎ ๐‘ง๐‘› ๐œ‡1 ๐œ‡2 y = ๐œ‡1x1 + ๐œ‡2x2

How the machine works

slide-7
SLIDE 7

๐ณ = ฮป๐‘—๐ฒ๐‘—

๐‘œ ๐‘—=1

= | | ๐‘ฆ1 โ‹ฏ ๐‘ฆ๐‘œ | | โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ = ฮป๐‘— ๐‘ฆ1,๐‘— โ‹ฎ ๐‘ฆ๐‘›,๐‘—

๐‘œ ๐‘—=1

= ๐‘ฆ1,1 โ‹ฏ ๐‘ฆ1,๐‘œ โ‹ฎ โ‹ฎ ๐‘ฆ๐‘›,1 โ‹ฏ ๐‘ฆ๐‘›,๐‘œ โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ

Matrix Representation

slide-8
SLIDE 8

Matrix Representation

๐ณ = ฮป๐‘—๐ฒ๐‘—

๐‘œ ๐‘—=1

= | | ๐ฒ1 โ‹ฏ ๐ฒ๐‘œ | | โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ = ฮป๐‘— ๐‘ฆ1,๐‘— โ‹ฎ ๐‘ฆ๐‘›,๐‘—

๐‘œ ๐‘—=1

= ๐‘ฆ1,1 โ‹ฏ ๐‘ฆ1,๐‘œ โ‹ฎ โ‹ฎ ๐‘ฆ๐‘›,1 โ‹ฏ ๐‘ฆ๐‘›,๐‘œ โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ

Short

๐ณ = ๐˜ โ‹… ๐›

Matrix

๐˜ = ๐‘ฆ1,1 โ‹ฏ ๐‘ฆ1,๐‘œ โ‹ฎ โ‹ฎ ๐‘ฆ๐‘›,1 โ‹ฏ ๐‘ฆ๐‘›,๐‘œ Vectors ๐› = ๐œ‡1 โ‹ฎ ฮป๐‘œ , ๐ณ = ๐‘ง1 โ‹ฎ ๐‘ง๐‘›

slide-9
SLIDE 9

Convention

Taken from Textbook [Shirley et al.]

  • Matrix elements

๐‘ฆ๐‘ ๐‘๐‘ฅ,๐‘‘๐‘๐‘š๐‘ฃ๐‘›๐‘œ

  • Row first, then column
  • โ€œyโ€-coordinate of the array first

(unintuitive, but common convention)

๐‘ฆ1,1 โ‹ฏ ๐‘ฆ1,๐‘œ โ‹ฎ โ‹ฎ ๐‘ฆ๐‘›,1 โ‹ฏ ๐‘ฆ๐‘›,๐‘œ

๐‘› ๐‘ ๐‘๐‘ฅ๐‘ก ๐‘œ ๐‘‘๐‘๐‘š๐‘ฃ๐‘›๐‘œ๐‘ก

slide-10
SLIDE 10

Matrix Representation

Matrix-vector product Construction

  • Maps from โ„๐‘œ โ†’ โ„๐‘›
  • ๐› โˆˆ โ„๐‘œ
  • ๐ฒ๐‘— โˆˆ โ„๐‘› โ‡’ ๐ณ โˆˆ โ„๐‘›
  • Columns of ๐˜ = images of the basis vectors of โ„๐‘œ

๐ณ ๐› = | | ๐ฒ1 โ‹ฏ ๐ฒ๐‘œ | | โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ

slide-11
SLIDE 11

Example

Example: rotation matrix

๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1 ๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1

๐๐‘ ๐‘๐‘ข = cos ๐›ฝ โˆ’ sin ๐›ฝ sin ๐›ฝ cos ๐›ฝ

cos ๐›ฝ sin ๐›ฝ โˆ’ sin ๐›ฝ cos ๐›ฝ

slide-12
SLIDE 12

General Matrix Product (Notation)

Algebraic rule:

  • Vector-matrix product:

๐ โ‹… ๐ฒ = ๐ณ

=

๐ณ ๐ ๐ฒ

slide-13
SLIDE 13

General Matrix Product (Notation)

Algebraic rule:

  • Vector-matrix product:

ยฐ

๐ โ‹… ๐ฒ = ๐ณ

ยฐ

๐ณ ๐ ๐ฒ

ร— ร— ร— ร— โˆ‘ โˆ‘ ร— ร— ร— ร—

slide-14
SLIDE 14

General Matrix Product (Notation)

Algebraic rule:

  • Vector-matrix product:

ยฐ

๐ โ‹… ๐ฒ = ๐ณ ๐ณ ๐ ๐ฒ

ร— ร— ร— ร— โˆ‘ โˆ‘ ร— ร— ร— ร—

ยฐ ยฐ

slide-15
SLIDE 15

General Matrix Product (Notation)

Algebraic rule:

  • Vector-matrix product:

ยฐ

๐ โ‹… ๐ฒ = ๐ณ ๐ณ ๐ ๐ฒ

ร— ร— ร— ร— โˆ‘ โˆ‘ ร— ร— ร— ร—

ยฐ ยฐ ยฐ

slide-16
SLIDE 16

General Matrix Product (Notation)

Algebraic rule:

  • Vector-matrix product:

ยฐ

๐ โ‹… ๐ฒ = ๐ณ ๐ณ ๐ ๐ฒ

ร— ร— ร— ร— โˆ‘ ร— ร— ร— ร— โˆ‘

ยฐ ยฐ ยฐ ยฐ

slide-17
SLIDE 17

Matrix Representation

Matrix-Vector Multiplication

๐‘ฆ1,1 โ‹ฏ ๐‘ฆ1,1 โ‹ฎ โ‹ฎ ๐‘ฆ๐‘›,1 โ‹ฏ ๐‘ฆ๐‘›,๐‘œ โ‹… ๐œ‡1 โ‹ฎ ฮป๐‘œ โ‰” ๐œ‡๐‘— ๐‘ฆ1,๐‘— โ‹ฎ ๐‘ฆ๐‘›,๐‘—

๐‘œ ๐‘—=1

= ๐œ‡1 โ‹… ๐‘ฆ1,1 + โ‹ฏ + ๐œ‡๐‘œ โ‹… ๐‘ฆ1,๐‘œ โ‹ฎ ๐œ‡1 โ‹… ๐‘ฆ๐‘›,1 + โ‹ฏ + ๐œ‡๐‘œ โ‹… ๐‘ฆ๐‘›,๐‘œ ยฐ

slide-18
SLIDE 18

basic topics study completely

BASIC

Standard Transformations

slide-19
SLIDE 19

Identity Transform

Example: identity matrix

๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1 ๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1

๐๐‘—๐‘’๐‘“๐‘œ๐‘ข๐‘—๐‘ข๐‘ง = ๐‰ = 1 1

๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1 ๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1

General case ๐‰: โ„๐‘œ โ†’ โ„๐‘œ, ๐‰ = 1 โ‹ฏ 1 โ‹ฎ โ‹ฑ โ‹ฎ โ‹ฏ 1

slide-20
SLIDE 20

1 1

Scaling (Center = Origin)

๐œ‡ ๐œ‡

General case ๐“๐œ‡: โ„๐‘œ โ†’ โ„๐‘œ, ๐“๐œ‡ = ๐œ‡ โ‹ฏ ๐œ‡ โ‹ฎ โ‹ฑ โ‹ฎ โ‹ฏ ๐œ‡

slide-21
SLIDE 21

1 1

Non-Uniform Scaling

๐œ‡1 ๐œ‡2

General case ๐“๐›: โ„๐‘œ โ†’ โ„๐‘œ, ๐“๐› = ๐œ‡1 โ‹ฏ ๐œ‡2 โ‹ฎ โ‹ฑ โ‹ฎ โ‹ฏ ๐œ‡3

slide-22
SLIDE 22

Rotation (2D)

๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1 ๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1

๐๐‘ ๐‘๐‘ข = cos ๐›ฝ โˆ’ sin ๐›ฝ sin ๐›ฝ cos ๐›ฝ

cos ๐›ฝ sin ๐›ฝ โˆ’ sin ๐›ฝ cos ๐›ฝ

slide-23
SLIDE 23

Rotation (3D)

๐ฐ = ๐‘ฆ ๐‘ง ๐‘จ

๐ณ ๐ฒ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด

๐‘Š = โ„3

๐ณ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ณ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ณ

slide-24
SLIDE 24

Rotation (3D)

๐ณ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ณ ๐ฉ๐ฌ๐ฃ๐ก๐ฃ๐จ ๐ด ๐ฒ ๐ณ ๐’๐‘ฆ = 1 cos ๐›ฝ โˆ’ sin ๐›ฝ sin ๐›ฝ cos ๐›ฝ ๐’๐‘จ = cos ๐›ฝ โˆ’ sin ๐›ฝ sin ๐›ฝ cos ๐›ฝ 1 ๐’๐‘ง = cos ๐›ฝ โˆ’ sin ๐›ฝ 1 sin ๐›ฝ cos ๐›ฝ

slide-25
SLIDE 25

Reflection

General case ๐“๐œ‡: โ„๐‘œ โ†’ โ„๐‘œ, ๐“๐œ‡ = 1 โ‹ฏ โˆ’1 โ‹ฎ โ‹ฑ โ‹ฎ โ‹ฏ 1

1 1 โˆ’1 1 ๐๐‘ ๐‘“๐‘”๐‘š = โˆ’1 1 Reflection Axis

slide-26
SLIDE 26

Shearing

1 1

๐๐‘กโ„Ž๐‘“๐‘๐‘  = 1 ๐œ‡ 1

0.5 1

slide-27
SLIDE 27

General Case

You can combine all of these Example: General axis of rotation

  • First rotate rotation axis to x-axis
  • Rotate around x
  • Rotate back

Question

  • How to combine multiple matrix multiplications?
slide-28
SLIDE 28

basic topics study completely

BASIC

Combining Transformations

Matrix Products

slide-29
SLIDE 29

Matrix Multiplication

Execute multiple linear maps,

  • ne after another
  • Written as product
  • ๐‚ โ‹… ๐ โ‹… ๐ฒ:
  • Apply ๐ to ๐ฒ first
  • Then ๐‚
  • ๐‚ โ‹… ๐ is again a matrix
slide-30
SLIDE 30

How does it work?

Consider ๐‚ โ‹… ๐ :

  • Rotate first (๐)
  • Then scale (๐‚)

๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1 ๏ƒท ๏ƒท ๏ƒธ ๏ƒถ ๏ƒง ๏ƒง ๏ƒจ ๏ƒฆ 1

cos ๐›ฝ sin ๐›ฝ โˆ’ sin ๐›ฝ cos ๐›ฝ

1 1 2 2

๐ ๐‚

slide-31
SLIDE 31

How does it work?

How to compute ๐‚ โ‹… ๐ ?

  • Transform basis vectors
  • Transform again

cos ๐›ฝ sin ๐›ฝ โˆ’ sin ๐›ฝ cos ๐›ฝ ๐

๐‚ โ‹… ๐

2cos ๐›ฝ 2sin ๐›ฝ โˆ’ 2sin ๐›ฝ 2cos ๐›ฝ

slide-32
SLIDE 32

Matrix product: ๐

Matrix Multiplication

๐‚ ๐›1 ๐›4

column 4

๐›3

column 3

๐›2

column 2 column 1

slide-33
SLIDE 33

๐

Matrix Multiplication

Matrix product: ๐‚

ยฐ

slide-34
SLIDE 34

Matrix Multiplication

General matrix products:

  • ๐‚ โ‹… ๐: possible if

#Row(๐) = #Columns(๐‚)

ยฐ

๐ ๐‚

๐ = ๐‘1,1 โ‹ฏ ๐‘1,๐‘œ โ‹ฎ โ‹ฎ ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ ๐‚ = ๐‘1,1 โ‹ฏ ๐‘1,๐‘› โ‹ฎ โ‹ฎ ๐‘๐‘™,1 โ‹ฏ ๐‘๐‘™,๐‘›

๐‘™ ๐‘› ๐‘œ ๐‘œ ๐‘› ๐‘™

๐’ = ๐‘ 

1,1

โ‹ฏ ๐‘ 

1,๐‘œ

โ‹ฎ โ‹ฎ ๐‘ 

๐‘™,1

โ‹ฏ ๐‘ 

๐‘™,๐‘œ

๐’ = ๐‚ โ‹… ๐ ๐‘ 

๐‘—,๐‘˜ = ๐‘๐‘Ÿ,๐‘˜ โ‹… ๐‘๐‘—,๐‘Ÿ ๐‘› ๐‘Ÿ=1

slide-35
SLIDE 35

Rules for Matrix Multiplication

Matrix-Multiplication

  • Associative

๐ โ‹… ๐‚ โ‹… ๐ƒ = ๐ โ‹… ๐‚ โ‹… ๐ƒ

  • Includes vector-multiplication

๐ โ‹… ๐‚ โ‹… ๐ฐ = ๐ โ‹… ๐‚ โ‹… ๐ฐ

  • In general, not commutative:

It might be that ๐ โ‹… ๐‚ โ‰  ๐‚ โ‹… ๐

  • Linear

๐ โ‹… ๐ฐ + ๐ฑ = ๐ โ‹… ๐ฐ + ๐ โ‹… ๐ฑ ๐ โ‹… ๐œ‡ โ‹… ๐ฐ = ๐œ‡ โ‹… ๐ โ‹… ๐ฐ

(Remark: linearity is used to define linear maps axiomatically)

๐œ‡ โˆˆ โ„ ๐, ๐‚, ๐ƒ - matrices ๐ฐ, ๐ฑ - vectors

Settings

slide-36
SLIDE 36

core topics important

CORE

Reversing Transformations

Matrix Inversion

slide-37
SLIDE 37

Inverse Matrix

Can we find the inverse matrix?

  • โ€œUndo effectโ€
  • Formally

๐โˆ’1 โ‹… ๐ = ๐‰

slide-38
SLIDE 38

Inverse Matrix

Examples

  • Rotation matrix

๐๐‘ ๐‘๐‘ข = cos ๐›ฝ โˆ’ sin ๐›ฝ sin ๐›ฝ cos ๐›ฝ

  • Inverse?

cos ๐›ฝ sin ๐›ฝ โˆ’ sin ๐›ฝ cos ๐›ฝ ๐๐‘ ๐‘๐‘ข cos(โˆ’๐›ฝ) sin(โˆ’๐›ฝ) ๐๐‘ ๐‘๐‘ข

โˆ’1

๐›ฝ โˆ’๐›ฝ

๐๐‘ ๐‘๐‘ข

โˆ’1 = cos(โˆ’๐›ฝ)

โˆ’ sin(โˆ’๐›ฝ) sin(โˆ’๐›ฝ) cos(โˆ’๐›ฝ)

โˆ’ sin(โˆ’๐›ฝ) cos(โˆ’๐›ฝ)

slide-39
SLIDE 39

Inverse Matrix

Examples

  • Null matrix

๐Ÿ = 0

  • Inverse?

๐Ÿ

slide-40
SLIDE 40

Inverse Matrix

Examples

  • Projection matrix (remove x-component)

๐๐‘ž๐‘ ๐‘˜ = 0

1

  • Inverse?

1 ๐๐‘ž๐‘ ๐‘˜

slide-41
SLIDE 41

Inverse Matrix

Examples

  • Projection matrix (remove x-component)

๐๐‘”๐‘๐‘œ๐‘‘๐‘ง = 2

1 4 2

  • Inverse?

2 4 1 2 ๐๐‘”๐‘๐‘œ๐‘‘๐‘ง

slide-42
SLIDE 42

Invertible Matrices

Invertible matrices

  • Are always square (#rows = #columns)
  • In addition
  • Columns are linearly independent

Equivalent characterizations:

  • Square and rows are linearly independent
  • Columns form basis of vector space
  • Rows form basis of vector space
slide-43
SLIDE 43

Invertible Matrices

Rank

  • Number of linearly independent columns
  • Dimension of span{๐๐ฉ๐ฆ๐ฏ๐ง๐จ_๐ฐ๐Ÿ๐๐ฎ๐ฉ๐ฌ๐ญ}

Theorem

  • Rank = number of linearly independent rows

Full rank

  • rank(๐) = dim

(๐‘Š)

  • Then: ๐ is invertible
slide-44
SLIDE 44

Linear Systems of Equations

First consider simpler case

  • Say, we know that

๐ โ‹… ๐ฒ = ๐ณ

  • Square matrix ๐ โˆˆ โ„๐‘’ร—๐‘’
  • Vectors ๐ฒ, ๐ณ โˆˆ โ„๐‘’ร—๐‘’

Knowns & Unknowns

  • We are given ๐, ๐ณ
  • We should compute ๐ฒ
  • Linear system of equations
slide-45
SLIDE 45

Linear Systems of Equations

Linear System of Equations

๐ โ‹… ๐ฒ = ๐ณ โ‡”

๐‘›1,1 โ‹ฏ ๐‘›1,๐‘’ โ‹ฎ โ‹ฎ ๐‘›๐‘’,1 โ‹ฏ ๐‘›๐‘’,๐‘’ โ‹… ๐‘ฆ1 โ‹ฎ ๐‘ฆ๐‘’ = ๐‘ง1 โ‹ฎ ๐‘ง๐‘’

โ‡”

๐‘›1,1๐‘ฆ1 + โ‹ฏ + ๐‘›1,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง1 ๐‘›2,1๐‘ฆ1 + โ‹ฏ + ๐‘›2,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง2 โ‹ฎ ๐‘›๐‘’,1๐‘ฆ1 + โ‹ฏ + ๐‘›๐‘’,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง๐‘’

and and

slide-46
SLIDE 46

Gaussian Elimination

Linear System

โˆง ๐‘›1,1๐‘ฆ1 + โ‹ฏ + ๐‘›1,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง1 โˆง ๐‘›2,1๐‘ฆ1 + โ‹ฏ + ๐‘›2,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง2 โ‹ฎ โˆง ๐‘›๐‘’,1๐‘ฆ1 + โ‹ฏ + ๐‘›๐‘’,๐‘’ ๐‘ฆ๐‘’ = ๐‘ง๐‘’

Row Operations

  • Swap rows ๐‘ 

๐‘—, ๐‘  ๐‘˜

  • Scale row ๐‘ 

๐‘— by factor ๐œ‡ โ‰  0

  • Add multiple of row ๐‘ 

๐‘— to row ๐‘  ๐‘˜, ๐‘— โ‰  ๐‘˜

(i.e., ๐‘ 

๐‘— += ๐œ‡๐‘  ๐‘˜)

slide-47
SLIDE 47

Convert to Upper Triangle Matrix

=

๐ณ ๐ ๐ฒ

= = =

0 0

(use row-operations)

slide-48
SLIDE 48

Convert to Diagonal Matrix

=

๐ณ ๐ ๐ฒ

= = =

0 0

=

0 0

=

0 0

1 1 1 1 ๐‘ง1

โ€ฒ/m1,1 โ€ฒ

๐‘ง2

โ€ฒ/m2,2 โ€ฒ

๐‘ง3

โ€ฒ/m3,3 โ€ฒ

๐‘ง4

โ€ฒ/m4,4 โ€ฒ

๐‘ฆ1 ๐‘ฆ2 ๐‘ฆ3 ๐‘ฆ4

(use row-operations)

๐‘›1,1

โ€ฒ

๐‘›2,2

โ€ฒ

๐‘›3,3

โ€ฒ

๐‘›4,4

โ€ฒ

๐‘ง1

โ€ฒ

๐‘ง2

โ€ฒ

๐‘ง3

โ€ฒ

๐‘ง4

โ€ฒ

๐‘ฆ1 ๐‘ฆ2 ๐‘ฆ3 ๐‘ฆ4

slide-49
SLIDE 49

Gauss-Algorithm

Gauss-Algorithm

  • Substract rows to cancel front-coefficient
  • Create upper triangle matrix first
  • Then create diagonal matrix
  • If current row starts with 0
  • Swap with another row
  • If all rows start with 0: matrix not invertible
  • Diagonal form: Solution can be read-off
  • Data structure
  • Modify matrix M, โ€œright-hand-sideโ€ y.
  • x remains unknown (no change)
slide-50
SLIDE 50

Matrix Inverse

Solve for

๐ โ‹… ๐ฒ1 = 1 โ‹ฎ , ๐ โ‹… ๐ฒ2 = 1 โ‹ฎ , โ€ฆ , ๐ โ‹… ๐ฒ๐‘’ = โ‹ฎ 1

  • The resulting ๐ฒ1, ๐ฒ2, โ€ฆ , ๐ฒ๐‘’ are the columns of ๐โˆ’1:

๐โˆ’1 = | | ๐ฒ1 โ‹ฏ ๐ฒ๐‘’ | |

slide-51
SLIDE 51

Matrix Inverse

Algorithm

  • Simultaneous Gaussian elimination
  • Start as follows:
  • Handle all right-hand sides simultaneously
  • After Gauss-algorithm, the right-hand matrix

is the inverse

=

0 0

1 1 1 1

๐ ๐ฒ ๐‰

slide-52
SLIDE 52

Alternative: Kramerโ€™s Rule

Small Matrices

  • Direct formula based on determinants
  • โ€œKramerโ€™s ruleโ€
  • (more later)
  • Naive implementation has run-time ๐’ซ(๐‘’!)

โ€“ Gauss: ๐’ซ(๐‘’3)

  • Not advised for ๐‘’ > 3
slide-53
SLIDE 53

basic topics study completely

BASIC

More Vector Operations:

Scalar Products

slide-54
SLIDE 54

Additional Vector Operations

Length of Vectors

๐ฐ2 = ๐Ÿ“. ๐Ÿ‘cm

โ€œlengthโ€ or โ€œnormโ€ โ€–๐ฐโ€– yields real number โ‰ฅ 0

๐ฐ1 = ๐Ÿ‘. ๐Ÿ’cm ๐ฐ1 ๐ฐ2

slide-55
SLIDE 55

Additional Vector Operations

Angle between Vectors

๐›ฝ = โˆ  ๐ฐ1, ๐ฐ2 = ๐Ÿ’๐Ÿ’ยฐ

angle โˆ  ๐ฐ1, ๐ฐ2 yields real number 0, โ€ฆ , 2๐œŒ = [0, โ€ฆ , 360ยฐ)

๐ฐ1 ๐ฐ2

๐›ฝ

slide-56
SLIDE 56

Additional Vector Operations

Angle between Vectors

right angles ๐ฐ1 ๐ฐ2

90ยฐ

slide-57
SLIDE 57

Additional Vector Operations

Projection Projection: determine length of ๐ฐ along direction of ๐ฑ

๐ฐ ๐ฑ

90ยฐ

๐ฐ prj on ๐ฑ

slide-58
SLIDE 58

Additional Vector Operations

Scalar Product*)

๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ)

*) also known as inner product

  • r dot-product

also: ๐ฐ, ๐ฑ

90ยฐ

๐ฐ ๐ฑ

slide-59
SLIDE 59

Signature

  • ut
  • perato

tor โˆ—

Scalar Product

(dot product, inner-product)

in

42.0

in

slide-60
SLIDE 60

Additional Vector Operations

Scalar Product*)

90ยฐ

๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ)

*) also known as inner product

  • r dot-product

also: ๐ฐ, ๐ฑ ๐ฐ ๐ฑ

slide-61
SLIDE 61

Additional Vector Operations

Scalar Product*)

90ยฐ

๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ)

Comprises: length, projection, angles

*) also known as inner product

  • r dot-product

๐ฐ ๐ฑ

slide-62
SLIDE 62

Additional Vector Operations

๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ)

Comprises: length, projection, angles

Length: ๐ฐ = ๐ฐ โ‹… ๐ฐ Angle: โˆ  ๐ฐ, ๐ฑ = arccos ๐ฐ โ‹… ๐ฑ Projection: โ€ž๐ฐ prj on ๐ฑโ€ = ๐ฐโ‹…๐ฑ

๐ฑ

slide-63
SLIDE 63

basic topics study completely

BASIC

Algebraic Representation

(Implementation)

slide-64
SLIDE 64

Scalar Product

Scalar Product*)

๐ฐ ๐ฑ

90ยฐ

๐ฐ โ‹… ๐ฑ = ๐‘ค1 ๐‘ค2 โ‹… ๐‘ฅ1 ๐‘ฅ2 โ‰” ๐‘ค1 โ‹… ๐‘ฅ1 + ๐‘ค2 โ‹… ๐‘ฅ2 Theorem: ๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ)

slide-65
SLIDE 65

Scalar Product

Scalar product ๐ฐ โ‹… ๐ฑ = ๐‘ค1 ๐‘ค2 โ‹… ๐‘ฅ1 ๐‘ฅ2 ๐ฐ ๐ฐ = 3 2 ๐ฑ = 1 2 ๐ฑ

slide-66
SLIDE 66

Scalar Product

2D Scalar product ๐ฐ โ‹… ๐ฑ = ๐‘ค1 ๐‘ค2 โ‹… ๐‘ฅ1 ๐‘ฅ2 โ‰” ๐‘ค1 โ‹… ๐‘ฅ1 + ๐‘ค2 โ‹… ๐‘ฅ2 d-dim scalar product ๐ฐ โ‹… ๐ฑ = ๐‘ค1 โ‹ฎ ๐‘ค๐‘’ โ‹… ๐‘ฅ1 โ‹ฎ ๐‘ฅ๐‘’ โ‰” ๐‘ค1 โ‹… ๐‘ฅ1 + โ‹ฏ + ๐‘ค๐‘’ โ‹… ๐‘ฅ๐‘’

slide-67
SLIDE 67

Algebraic Properties

Properties

  • Symmetry (commutativity)

๐ฏ, ๐ฐ = ๐ฐ, ๐ฏ

  • Bilinearity

๐œ‡๐ฐ, ๐ฑ = ๐œ‡ ๐ฐ, ๐ฑ = ๐ฐ, ๐œ‡๐ฑ ๐ฏ + ๐ฐ, ๐ฑ = ๐ฏ, ๐ฑ + ๐ฐ, ๐ฑ

(symmetry: same for second argument)

  • Positive definite

๐ฏ, ๐ฏ โ‰ฅ 0, ๐ฏ, ๐ฏ = ๐Ÿ โ‡’ ๐ฏ = ๐Ÿ

These three: axiomatic definition

๐œ‡ โˆˆ โ„ ๐ฏ, ๐ฐ, ๐ฑ โˆˆ โ„๐‘’

Settings

slide-68
SLIDE 68

Attention!

Do not mix

  • Scalar-vector product
  • Inner (scalar) product

In general ๐ฒ, ๐ณ โ‹… ๐ด โ‰  ๐ฒ โ‹… ๐ณ, ๐ด Beware of notation: ๐ฒ โ‹… ๐ณ โ‹… ๐ด โ‰  ๐ฒ โ‹… ๐ณ โ‹… ๐ด

(no violation of associativity: different operations; details later)

slide-69
SLIDE 69

core topics important

CORE

Applications of the Scalar Product

slide-70
SLIDE 70

Applications

Obvious applications

  • Measuring length
  • Measuring angles
  • Projections

More complex applications

  • Creating orthogonal (90ยฐ) pairs of vectors
  • Creating orthogonal bases
slide-71
SLIDE 71

Projection

Scalar Product*)

90ยฐ

๐ฐ โ‹… ๐ฑ = ๐ฐ โ‹… ๐ฑ โ‹… cos โˆ (๐ฐ, ๐ฑ) ๐ฐ ๐ฑ

slide-72
SLIDE 72

Projection

Scalar Product*)

90ยฐ

๐ฐ ๐ฑ ๐ฑn ๐ฑn = ๐ฑ ๐ฑ = ๐ฑ ๐ฑ, ๐ฑ

projection prj.-vector

Projection: ๐ฐ โ‹…

๐ฑ ๐ฑโ‹…๐ฑ

Prj.-Vector: ๐ฐ,

๐ฑ ๐ฑ,๐ฑ

โ‹…

๐ฑ ๐ฑ,๐ฑ

= ๐ฐ, ๐ฑ โ‹…

๐ฑ ๐ฑ,๐ฑ

slide-73
SLIDE 73

Orthogonalization

Scalar Product*)

90ยฐ

๐ฐ ๐ฑ ๐ฑn = ๐ฑ ๐ฑ = ๐ฑ ๐ฑ, ๐ฑ

projection prj.-vector

Orthogonalize ๐ฐ wrt. ๐ฑ:

๐ฐโ€ฒ = ๐ฐ โˆ’ ๐ฐ, ๐ฑ โ‹… ๐ฑ ๐ฑ, ๐ฑ ๐ฐโ€ฒ

slide-74
SLIDE 74

Orthogonalization

Scalar Product*)

90ยฐ

๐ฐ ๐ฑ ๐ฐโ€ฒ

Orthogonalize ๐ฐ wrt. ๐ฑ:

๐ฐโ€ฒ = ๐ฐ โˆ’ ๐ฐ, ๐ฑ โ‹… ๐ฑ ๐ฑ, ๐ฑ

slide-75
SLIDE 75

Gram-Schmidt Orthogonalization

Orthogonal basis

  • All vectors in 90ยฐ angle to each other

๐œ๐‘—, ๐œ๐‘˜ = 0 for ๐‘— โ‰  ๐‘˜

Create orthogonal bases

  • Start with arbitrary one
  • Orthogonalize ๐œ2 by ๐œ1
  • Orthogonalize ๐œ3 by ๐œ1, then by ๐œ2
  • Orthogonalize ๐œ4 by ๐œ1, then by ๐œ2, then by ๐œ3
  • ...
slide-76
SLIDE 76

Orthonormal Basis

Orthonormal bases

  • Orthogonal and all vectors have unit length

Computation

  • Orthogonalize first
  • Then scale each vector ๐œ๐‘— by 1/ ๐œ๐‘— .
slide-77
SLIDE 77

Matrices

Orthogonal Matrices

  • A matrix with orthonormal columns

is called orthogonal matrix

  • Yes, this terminology is not quite logical...

Orthogonal Matrices are always

  • Rotation matrices
  • Or reflection matrices
  • Or products of the two
slide-78
SLIDE 78

core topics important

CORE

Further Operations

slide-79
SLIDE 79

Cross Product

Cross-Product: Exists Only For 3D Vectors!

  • ๐ฒ, ๐ณ โˆˆ โ„3
  • ๐ฒ ร— ๐ณ =

๐‘ฆ1 ๐‘ฆ2 ๐‘ฆ3 ร— ๐‘ง1 ๐‘ง2 ๐‘ง3 โ‰” ๐‘ฆ2๐‘ง3 โˆ’ ๐‘ฆ3๐‘ง2 ๐‘ฆ3๐‘ง1 โˆ’ ๐‘ฆ1๐‘ง3 ๐‘ฆ1๐‘ง2 โˆ’ ๐‘ฆ2๐‘ง1

Geometrically: Theorem

  • ๐ฒ ร— ๐ณ orthogonal to ๐ฒ, ๐ณ
  • Right-handed system ๐ฒ, ๐ณ, ๐ฒ ร— ๐ณ
  • ๐ฒ ร— ๐ณ

= ๐ฒ โ‹… ๐ณ โ‹… sinโˆ  ๐ฒ, ๐ณ

y x x ๏‚ด y โ€–x ๏‚ด yโ€–

slide-80
SLIDE 80

Cross-Product Properties

Bilinearity

  • Distributive:

๐ฏ ร— ๐ฐ + ๐ฑ = ๐ฏ ร— ๐ฐ + ๐ฏ ร— ๐ฑ

  • Scalar-Mult.:

๐œ‡๐ฏ ร— ๐ฐ = ๐ฏ ร— ๐œ‡๐ฐ = ๐œ‡ ๐ฏ ร— ๐ฐ

But beware of

  • Anti-Commutative: ๐ฏ ร— ๐ฐ = โˆ’๐ฐ ร— ๐ฏ
  • Not associative;

we can have ๐ฏ ร— ๐ฐ ร— ๐ฑ โ‰  ๐ฏ ร— ๐ฐ ร— ๐ฑ

slide-81
SLIDE 81

Determinants

Determinants

  • Square matrix M
  • det(M) = |M| = volume of parallelepiped
  • f column vectors

v2 v1 det ๐

๐ = | | | ๐ฐ1 ๐ฐ2 ๐ฐ3 | | |

v3

slide-82
SLIDE 82

Determinants

Sign:

  • Positive for right handed coordinates
  • Negative for left-handed coordinates

v2 v1 det ๐ > 0

๐ = | | | ๐ฐ1 ๐ฐ2 ๐ฐ3 | | |

v3 v1 v2 det ๐โ€ฒ

< 0 ๐โ€ฒ = | | | ๐ฐ2 ๐ฐ1 ๐ฐ3 | | |

v3

negative determinant โ†’ map contains reflection

slide-83
SLIDE 83

Properties

A few properties:

  • det(A) det(B) = det(Aโ‹…B)
  • det(๐œ‡A) = ๐œ‡d det(A) (d ๏‚ด d matrix A)
  • det(A-1) = det(A)-1
  • det(AT) = det(A)
  • det ๐ โ‰  0 โ‡” ๐ invertible
  • Efficient computation using Gaussian elimination

sign flips! โ†’ reflections cancel each

  • ther (parity)
slide-84
SLIDE 84

Computing Determinants

๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘“ ๐‘” ๐‘• โ„Ž ๐‘— = +๐‘ ๐‘“ ๐‘” โ„Ž ๐‘— โˆ’ ๐‘ ๐‘’ ๐‘” ๐‘• ๐‘— + ๐‘‘ ๐‘’ ๐‘“ ๐‘• โ„Ž

Recursive Formula

  • Sum over first row
  • Multiply element there

with subdeterminant

  • Subdeterminant :

Leave out row and column

  • f selected element
  • Recursion ends with |a|= a
  • Alternate signs +/โˆ’/+/โˆ’/โ€ฆ

๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘“ ๐‘” ๐‘• โ„Ž ๐‘— ๐‘’ ๐‘” ๐‘• ๐‘—

subdeterminants

+๐‘ โˆ’๐‘ +๐‘‘ ๐‘’ ๐‘“ ๐‘” ๐‘• โ„Ž ๐‘—

signs

Beware of ๐’ซ ๐‘’๐‘—๐‘›! complexity

+ โˆ’ + |a|= a

slide-85
SLIDE 85

Computing Determinants

Result in 3D Case

det ๐‘ ๐‘ ๐‘‘ ๐‘’ ๐‘“ ๐‘” ๐‘• โ„Ž ๐‘— = ๐‘๐‘“๐‘— + ๐‘๐‘”๐‘• + ๐‘‘๐‘’โ„Ž โˆ’ ๐‘‘๐‘“๐‘• โˆ’ ๐‘๐‘’๐‘— โˆ’ ๐‘๐‘”โ„Ž

slide-86
SLIDE 86

Solving Linear Systems

Consider ๐ โ‹… ๐ฒ = ๐œ

  • Invertible matrix ๐ โˆˆ โ„๐‘’ร—๐‘’
  • Known vector ๐œ โˆˆ โ„๐‘’
  • Unknown vector ๐ฒ โˆˆ โ„๐‘’

Solution with Determinants (Cramarโ€™s rule): ๐‘ฆ๐‘— = det ๐๐‘— det ๐

๐๐‘— = | | | ๐ฐ1 โ‹ฏ ๐œ โ‹ฏ ๐ฐ3 | | |

column ๐‘—

slide-87
SLIDE 87

advanced topics main ideas

ADV

Addendum

Matrix Algebra

slide-88
SLIDE 88

Matrix Algebra

Define three operations

  • Matrix addition

๐‘1,1 โ‹ฏ ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ + ๐‘1,1 โ‹ฏ ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ = ๐‘1,1 + ๐‘1,1 โ‹ฏ ๐‘1,๐‘œ + ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘›,1 + ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ + ๐‘๐‘›,๐‘œ

  • Scalar matrix multiplication

๐œ‡ โ‹… ๐‘1,1 โ‹ฏ ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ = ๐œ‡ โ‹… ๐‘1,1 โ‹ฏ ๐œ‡ โ‹… ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐œ‡ โ‹… ๐‘๐‘›,1 โ‹ฏ ๐œ‡ โ‹… ๐‘๐‘›,๐‘œ

  • Matrix-matrix multiplication

๐‘1,1 โ‹ฏ ๐‘1,๐‘œ โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘›,1 โ‹ฏ ๐‘๐‘›,๐‘œ โ‹… ๐‘1,1 โ‹ฏ ๐‘1,๐‘› โ‹ฎ โ‹ฑ โ‹ฎ ๐‘๐‘™,1 โ‹ฏ ๐‘๐‘™,๐‘› = โ‹ฑ โ‹ฐ ๐‘๐‘Ÿ,๐‘˜ โ‹… ๐‘๐‘—,๐‘Ÿ

๐‘™ ๐‘Ÿ=1

โ‹ฐ โ‹ฑ

slide-89
SLIDE 89

Transposition

Matrix Transposition

  • Swap rows and columns
  • Formally:

โ‹ฑ โ‹… โ‹ฐ โ‹… โ‹… โ‹… โ‹… โ‹… โ‹… โ‹… โ‹… โ‹ฐ โ‹… โ‹ฑ

T

= โ‹ฑ โ‹… โ‹… โ‹… โ‹ฐ โ‹… โ‹… โ‹… โ‹… โ‹ฐ โ‹… โ‹… โ‹… โ‹ฑ

T =

๐‘๐‘—,๐‘˜ ๐‘๐‘˜,๐‘—

slide-90
SLIDE 90

Vectors

Vectors

  • Column matrices
  • Matrix-Vector product consistent

Co-Vectors

  • โ€œprojectorsโ€, โ€œdual vectorsโ€,

โ€œlinear formsโ€, โ€œrow vectorsโ€

  • Vectors to be projected on

Transposition

  • Convert vectors into projectors and vice versa

๐ฒ โˆˆ โ„๐‘’ ๐ณT โˆˆ โ„๐‘’

slide-91
SLIDE 91

Vectors

Inner product (as a generalized โ€œprojectionโ€)

  • Matrix-product ๐๐ฉ๐ฆ๐ฏ๐ง๐จ โ‹… ๐ฌ๐ฉ๐ฑ

โ€ž๐ฒ โ‹… ๐ณโ€œ = ๐ฒ, ๐ณ = ๐ฒT โ‹… ๐ณ

  • People use all three notations
  • Meaning of โ€œ โ‹… โ€ clear from context

๐ฒT โ‹… ๐ณ โ†’ โ„

slide-92
SLIDE 92

Matrix-Vector Products

Two Interpretations

  • Linear combination of column vectors
  • Projection on row (co-)vectors

ยฐ

๐ โ‹… ๐ฒ = ๐ณ ๐ณ ๐ ๐ฒ

โ‹… + โ‹… + โ‹… + โ‹…

ยฐ ยฐ ยฐ ยฐ

โ‹… โ‹… โ‹… โ‹… โ‹… =

slide-93
SLIDE 93

Matrix Algebra

We can add and scalar multiply

  • Matrices and vectors (special case)

We can matrix-multiply

  • Matrices with other matrices

(execute one-after-another)

  • Vectors in certain cases (next)

We can โ€œdivideโ€ by some (not all) matrices

  • Determine inverse matrix
  • Full-rank, square matrices only
slide-94
SLIDE 94

Algebraic Rules: Addition

Addition: like real numbers (โ€œcommutative groupโ€)

  • Prerequisites:
  • Number of rows match
  • Number of columns match
  • Associative:

๐ + ๐‚ + ๐ƒ = ๐ + ๐‚ + ๐ƒ

  • Commutative: ๐ + ๐‚ = ๐‚ + ๐
  • Subtraction:

๐ + โˆ’๐ = ๐Ÿ

  • Neutral Op.:

๐ + ๐Ÿ = ๐

๐, ๐‚, ๐ƒ โˆˆ โ„๐‘œร—๐‘›

(matrices, same size)

Settings

slide-95
SLIDE 95

Algebraic Rules: Scalar Multiplication

Scalar Multiplication: Vector space

  • Prerequisites:
  • Always possible
  • Repeated Scaling: ๐œ‡ ๐œˆ๐ = ๐œ‡๐œˆ ๐
  • Neutral Operation: 1 โ‹… ๐ = ๐
  • Distributivity 1:

๐œ‡(๐ + ๐‚) = ๐œ‡๐ + ๐œ‡๐‚

  • Distributivity 2:

๐œ‡ + ๐œˆ ๐ = ๐œ‡๐ + ๐œˆ๐

So far:

  • Matrices form vector space
  • Just different notation, same semantics!

๐œ‡ โˆˆ โ„ ๐, ๐‚ โˆˆ โ„๐‘œร—๐‘›

(same size)

Settings

slide-96
SLIDE 96

Algebraic Rules: Multiplication

Multiplication: Non-Commutative Ring / Group

  • Prerequisites:
  • Number of columns right

= number of rows left

  • Associative:

๐ โ‹… ๐‚ โ‹… ๐ƒ = ๐ โ‹… ๐‚ โ‹… ๐ƒ

  • Not commutative: often ๐ โ‹… ๐‚ โ‰  ๐‚ โ‹… ๐
  • Neutral Op.:

๐ โ‹… ๐‰ = ๐

  • Inverse:

๐ โ‹… ๐โˆ’1 = ๐‰

  • Additional prerequisite:

โ€“ Matrix must be square! โ€“ Matrix must have full rank

Set of invertible matrices: ๐ป๐‘€ ๐‘’ โŠ‚ โ„๐‘’ร—๐‘’ โ€œgeneral linear groupโ€

slide-97
SLIDE 97

Algebraic Rules: Multiplication

Multiplication: Non-Commutative Ring / Group

  • Prerequisites:
  • Number of columns right

= number of rows left

  • Associative:

๐ โ‹… ๐‚ โ‹… ๐ƒ = ๐ โ‹… ๐‚ โ‹… ๐ƒ

  • Not commutative: often ๐ โ‹… ๐‚ โ‰  ๐‚ โ‹… ๐
  • Neutral Op.:

๐ โ‹… ๐‰ = ๐

  • Inverse:

๐ โ‹… ๐โˆ’1 = ๐‰

  • Additional prerequisite:

โ€“ Matrix must be square! โ€“ Matrix must have full rank

Set of invertible matrices: ๐ป๐‘€ ๐‘’ โŠ‚ โ„๐‘’ร—๐‘’ โ€œgeneral linear groupโ€

๐ โˆˆ โ„๐‘œร—๐‘› ๐‚ โˆˆ โ„๐‘›ร—๐‘™ ๐ƒ โˆˆ โ„๐‘™ร—๐‘š

Settings

slide-98
SLIDE 98

Transposition Rules

Transposition

  • Addition:

๐ + ๐‚ T = ๐T + ๐‚T = ๐‚T + ๐T

  • Scalar-mult.:

๐œ‡๐ T = ๐œ‡๐T

  • Multiplication:

๐ โ‹… ๐‚ T = ๐‚T โ‹… ๐T

  • Self-inverse:

๐T T = ๐

  • (Inversion:)

๐ โ‹… ๐‚ โˆ’1 = ๐‚โˆ’1 โ‹… ๐โˆ’1

  • Inverse-transp.:

๐T โˆ’1 = ๐โˆ’1 T

  • Othogonality:

๐T = ๐โˆ’1 โ‡” ๐ is orthogonal

slide-99
SLIDE 99

Matrix Multiplication

Matrix Multiplication ๐ โ‹… ๐‚ = โˆ’ ๐›1 โˆ’ โ‹ฎ โˆ’ ๐›๐‘’ โˆ’ โ‹… | | ๐œ1 โ‹ฏ ๐œ๐‘’ | | = โ‹ฑ โ‹ฐ ๐›๐‘—, ๐œ๐‘˜ โ‹ฐ โ‹ฑ

  • Scalar products of rows and columns
slide-100
SLIDE 100

Orthogonal Matrices

Othogonal Matrices

  • (i.e., column vectors orthonormal)

๐๐‘ˆ = ๐โˆ’1

  • Proof: previous slide.
slide-101
SLIDE 101

Scalar Product

Matrix Algebra:

  • Scalar product is a special case

๐ฒ, ๐ณ = ๐ฒT โ‹… ๐ณ

  • Caution when mixing with scalar-vector product!

๐ฒ, ๐ณ โ‹… ๐ด โ‰  ๐ฒ โ‹… ๐ณ, ๐ด ๐ฒT โ‹… ๐ณ โ‹… ๐ด โ‰  ๐ฒ โ‹… ๐ณT โ‹… ๐ด

โ‹… โ‹… โ‰ 

Scalar multiplication not a matrix-product!

slide-102
SLIDE 102

Scalar Product

NOT OK

โ‹… โ‹…

OK

slide-103
SLIDE 103

Scalar Product

What does work:

  • Associativity with outer product

๐ฒ โ‹… ๐ณ, ๐ด = ๐ฒ โ‹… ๐ณT โ‹… ๐ด = ๐ฒ โ‹… ๐ณT โ‹… ๐ด

โ‹… โ‹… =

slide-104
SLIDE 104

advanced topics main ideas

ADV

Addendum

Axiomatic Mathematics

(This is not a core topic of the course; material is provided just for your information.)

slide-105
SLIDE 105

โ€œClass Diagramโ€ for Real Numbers

field

binary operation tion magma semi-grou

  • up

monoid group Abeli lian group

  • perator +
  • perator โ€ข
  • rdered

ed field Real Numbers rs

slide-106
SLIDE 106

Real Numbers

field

binary operation ion

binary operation: template <set T, operator โ—‹> T operatorโ€โ—‹โ€(T, T) throws DoesNotCompute

magma

closed binary operation: T operatorโ€โ—‹โ€(T, T) no-exceptions

semi mi-gr group

  • up

associativity: (A โ—‹ B) โ—‹ C = A โ—‹ (B โ—‹ C)

monoid

identity element โ€œidโ€: id โ—‹ A = A โ—‹ id = A

group

inverse โ€œT-1โ€: A โ—‹ A-1 = A-1 โ—‹ A = id

abelia ian group

commutativity: A โ—‹ B = B โ—‹ A

  • perator +
  • perator โ€ข

set with two operations template<set F> F operator+(F, F) F operator*(F, F)

  • rdered

ed field

full order: template<set F> bool operator<(F, F)

Real Numbers rs

completeness: โ€œall Cauchy series convergeโ€

slide-107
SLIDE 107

advanced topics main ideas

ADV

Structure: Vector Space

slide-108
SLIDE 108

Vector Spaces

Vector space:

  • Set of vectors V
  • Based on field F (we use only F = โ„)
  • Two operations:
  • Adding vectors u = v + w (u, v, w ๏ƒŽ V)
  • Scaling vectors w = ๏ฌv (u ๏ƒŽ V, ๏ฌ ๏ƒŽ F)
slide-109
SLIDE 109

Vector Spaces

Vector space axioms:

  • Vector addition โ€“ Abelian group:
  • โˆ€๐ฏ, ๐ฐ, ๐ฑ โˆˆ V: ๐ฏ + ๐ฐ + ๐ฑ = ๐ฏ + ๐ฐ + ๐ฑ
  • โˆ€๐ฏ, ๐ฐ โˆˆ V: ๐ฏ + ๐ฐ = ๐ฐ + ๐ฏ
  • โˆƒ๐Ÿ โˆˆ V: โˆ€๐ฐ โˆˆ V: ๐ฐ + ๐Ÿ = ๐ฐ
  • โˆ€๐ฐ โˆˆ V: โˆƒ"โˆ’v" โˆˆ V: v +(โˆ’v) = ๐Ÿ
  • Compatibility with scalar multiplication:
  • โˆ€๐ฐ โˆˆ V, ๐œ‡, ๐œˆ โˆˆ ๐บ: ๐œ‡ ๐œˆ๐ฏ = ๐œ‡๐œˆ ๐ฏ
  • โˆ€๐ฐ โˆˆ V: 1 โ‹… ๐ฐ = ๐ฐ
  • โˆ€๐ฐ, ๐ฑ โˆˆ V, ๐œ‡ โˆˆ ๐บ: ๐œ‡(๐ฐ + ๐ฑ) = ๐œ‡๐ฐ + ๐œ‡๐ฑ
  • โˆ€๐ฐ โˆˆ V, ๐œ‡, ๐œˆ โˆˆ ๐บ: ๐œ‡ + ๐œˆ ๐ฐ = ๐œ‡๐ฐ + ๐œˆv

Settings

๐‘Š: vector space ๐บ: field (e.g., โ„)

slide-110
SLIDE 110

Properties

Some differences to our definition

  • Abstract vector spaces can have infinite dimension
  • For example: The set of all functions

๐‘”: โ„ โ†’ โ„ forms an โˆž-dimensional vector space

  • But they always have a basis

โ†’ coordinate representation

  • We can use other fields than โ„, such as โ„‚ or finite

fields such as (โ„ค mod ๐‘ž, ๐‘ž prime)

  • We can recognize them before we have a

coordinate representation

slide-111
SLIDE 111

Theorem

Theorem (โ€œBasis-Isomorphismโ€)

  • Any finite-dimensional vector space can be

represented by columns of numbers

  • Use the ๐‘’ coordinates of the ๐‘’ basis vectors (dim= ๐‘’)

Our definition makes sense

  • Special case
slide-112
SLIDE 112

advanced topics main ideas

ADV

Structure: Scalar Product

slide-113
SLIDE 113

Scalar Product

Aximatic Definition: Scalar Product

  • Function
  • two vector arguments (input)
  • one scalar output
  • ๐‘: ๐‘Š ร— ๐‘Š โ†’ ๐บ

โ€“ think ๐‘ == โ€œ๐‘๐‘ž๐‘“๐‘ ๐‘๐‘ข๐‘๐‘  โˆ˜โ€

  • ๐‘Š is a vector space, F is a field (such as โ„)

๐‘Š: vector space ๐บ: field (e.g., โ„)

Settings

slide-114
SLIDE 114

Axiomatic Definition: Scalar Product

Properties

  • Symmetry

๐‘ ๐ฏ, ๐ฐ = ๐‘ ๐ฐ, ๐ฏ

  • Bilinearity

๐‘ ๐ฏ + ๐œ‡๐ฐ, ๐ฑ = ๐‘ ๐ฏ, ๐ฑ + ๐‘ ๐œ‡๐ฐ, ๐ฑ

(linearity in second argument follows from symmetry)

  • Positive definite

๐‘ ๐ฏ, ๐ฏ โ‰ฅ 0, ๐‘ ๐ฏ, ๐ฏ = ๐Ÿ โ‡’ ๐’— = ๐Ÿ

Symmetric, positive-definite, bilinear function

๐œ‡ โˆˆ ๐บ ๐ฏ, ๐ฐ, ๐ฑ โˆˆ ๐‘Š

Settings

slide-115
SLIDE 115

General Scalar Product

Theorem

  • In a finite-dimensional vector space, any scalar

product has the following form: ๐‘ ๐ฒ, ๐ณ = ๐๐ฒ โ‹… ๐๐ณ = ๐ฒT ๐T๐ ๐ณ

  • โ€œ โ‹… โ€ is the standard scalar product as we defined it
  • M is a square matrix with linearly-independent columns

โ€“ I.e., M transforms to a different coordinate frame

Our definition still makes senseโ€ฆ

  • Special case: undistorted coordinates
  • General scalar products can take non-standard

coordinate frames into account

slide-116
SLIDE 116

advanced topics main ideas

ADV

Structure: Linear Map

slide-117
SLIDE 117

Definition of Linear Maps

Axioms

  • Linear Map: A function

๐: ๐‘Š

1 โ†’ V2

maps from one vector space (๐‘Š

1) to another (๐‘Š 2)

  • Linearity requires

๐ ๐ฐ + ๐ฑ = ๐ โ‹… ๐ฐ + ๐ โ‹… ๐ฑ ๐ โ‹… ๐œ‡ โ‹… ๐ฐ = ๐œ‡ โ‹… ๐ โ‹… ๐ฐ

Theorem

  • Linear maps in finite-dimensional vector spaces

can always be represented by matrices

  • Our definition makes sense: special case

๐ โ€“ linear map ๐ฐ โˆˆ ๐‘Š

1 - vector

Settings