22
Matrix Algebra

Matrix Algebra - Byggnadsmekanik

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Matrix Algebra - Byggnadsmekanik

Matrix Algebra

Page 2: Matrix Algebra - Byggnadsmekanik

Matrix Algebra • Definitions • Addition and Subtraction • Multiplication • Determinant • Inverse • System of Linear Equations • Quadratic Forms • Partitioning • Differentiation and Integration

Page 3: Matrix Algebra - Byggnadsmekanik

2.1 Definitions • Scalar (0D matrix)

• Vector ( 1D matrix ) Transpose

• Matrix ( 2D matrix ) Transpose

Page 4: Matrix Algebra - Byggnadsmekanik

2.1 Definitions, contd

• Matrix size, [m x n] or [i x j], ( [row x col] ) – Vector, [m x 1]

• Square matrix, (m=n) [m x m] • Symmetric matrix, B=BT

[m x n] = [4 x 2]

Page 5: Matrix Algebra - Byggnadsmekanik

• Diagonal matrix

• Identity matrix, (unit matrix), AI=A

• Zero matrix

2.1 Definitions, contd

Page 6: Matrix Algebra - Byggnadsmekanik

2.2 Addition and Subtraction

• Vector

• Matrix

Page 7: Matrix Algebra - Byggnadsmekanik

2.3 Multiplication - scalar

• Scalar – vector multiplication

• Scalar – matrix multiplication

Page 8: Matrix Algebra - Byggnadsmekanik

2.3 Multiplication - vector • Scalar product, (vector – vector multiplication)

[1 x n] [n x 1] = [1 x 1]

• Length of vector (cf. Pythagoras' theorem)

Page 9: Matrix Algebra - Byggnadsmekanik

• Matrix product

[m x 1] [1 x n] = [m x n]

2.3 Multiplication - vector

[ ]

=

=

332313

322212

312111

321

3

2

1T

bababababababababa

bbbaaa

ab

Page 10: Matrix Algebra - Byggnadsmekanik

2.3 Multiplication - matrix • Matrix – vector multiplication

[m x n] [n x 1] = [m x 1] [3 x 2] [2 x 1] = [3 x 1]

• Vector – matrix multiplication

[1 x m] [m x n] = [1 x n]

Page 11: Matrix Algebra - Byggnadsmekanik

2.3 Multiplication - matrix

• Matrix – matrix multiplication

[m x n] [n x p] = [m x p]

Note!

Page 12: Matrix Algebra - Byggnadsmekanik

2.3 Multiplication – matrix, contd

• Product of transposed matrices

• Distribution law

Page 13: Matrix Algebra - Byggnadsmekanik

2.4 Determinant • The determinant may be calculated for any square

matrix, [n x n] • Cofactor of matrix, A (i=row, k=column)

• Expansion formula

Page 14: Matrix Algebra - Byggnadsmekanik

2.4 Determinant, examples

=

587654321

B

=

4321

A

2)4(241det −=−+⋅=A

23)8655()1( )11(11 −=⋅−⋅−= +cB

14)8352()1( )12(21 −=⋅−⋅−= +cB

3)5362()1( )13(31 −=⋅−⋅−= +cB

Cofactors

Determinant 12)3(7144)23(1det =−+⋅+−=B

44)1( )11(11 =−= +cA

22)1( )21(12 −=−= +cA

Determinant

Cofactors

Page 15: Matrix Algebra - Byggnadsmekanik

2.5 Inverse Matrix • The inverse A-1 of a square matrix A is defined by • The inverse may be determined by the cofactors, where

is the adjoint of A and

Page 16: Matrix Algebra - Byggnadsmekanik

2.4 Inverse, examples

=

587654321

B

=

4321

A

)2(1

1324

det/adj1

−==− AAA

−=

1324

adjA

T

B

−−−−

−−=

3636161432223

adj

121

3636162231423

det/adj1

−−−−

−−==− BBB

What happens if ?0det =A

Page 17: Matrix Algebra - Byggnadsmekanik

2.6 Systems of Linear Equations -number of equations is equal to number of unknowns

• Linear equation system

A is a square matrix [n x n], x and b [n x 1] vector

b = 0 => Homogeneous system b ≠ 0 => Inhomogeneous system

• Assume that det( A ) ≠ 0

Page 18: Matrix Algebra - Byggnadsmekanik

2.6 Linear Equations -number of equations is equal to number of unknowns

• Homogeneous system b = 0, (trivial solution: x = 0)

• Inhomogeneous system b ≠ 0

Eigenvalue problems

Page 19: Matrix Algebra - Byggnadsmekanik

2.8 Quadratic forms and positive definiteness

• If

• then the matrix A is positive definite

• If A is positive definite, all diagonal elements must be positive

Page 20: Matrix Algebra - Byggnadsmekanik

2.9 Partitioning

The matrix A may be partitioned as

and if

A may be written

Page 21: Matrix Algebra - Byggnadsmekanik

2.9 Partitioning, contd An equation system can be written with introduce The partitioned equation system is written or

Page 22: Matrix Algebra - Byggnadsmekanik

2.10 Differentiation and integration

• A matrix A

• Differentiation

• Integration