Escolar Documentos
Profissional Documentos
Cultura Documentos
2. Matrices
2-1
Matrices
m n-matrix A:
2-2
B C
D E
2 2
1 3
C=
0 2 3
5 4 7
D=
1 0
E=
1 6 0
2 2
0 2 3
5 4 7
A= 1 3
1 0 1 6 0
note: dimensions of the blocks must be compatible!
Matrices
2-3
Matrix transpose
A =
.
.
.
.
.
..
.
.
a1n a2n amn
AT is n m if A is m n
(AT )T = A
a square matrix A is symmetric if A = AT , i.e., aij = aji
Matrices
2-4
A =
..
..
..
...
a11 + b11
a12 + b12 a1n + b1n
a21 + b21
a22 + b22 a2n + b2n
A+B =
..
..
..
...
Matrices
2-5
Matrix-vector product
product of m n-matrix A with n-vector x
x1
x2
T
a x = a1 a2 an
..
xn
and x:
2-6
Linear functions
definition: a function f : Rn Rm is linear if superposition holds
f (x + y) = f (x) + f (y)
for all n-vectors x, y and all scalars ,
Matrices
2-7
Operator interpretation
think of a function f : Rn Rm in terms of its effect on x
x
y = f (x)
Matrices
2-8
Examples (f : R3 R3)
reverse the order of the components of x: y1 = x3, y2 = x2, y3 = x1
a linear function: f (x) = Ax with
0 0 1
A= 0 1 0
1 0 0
d1 0 0
A = 0 d2 0
0 0 d3
2-9
f (x) = Ax with
x
A=
cos sin
sin
cos
x
e
f (x) = Ax with
A=
f (e
x)
Matrices
1
2
1 1
1 1
2-10
xk+1
xk+2
slope yk+1
u(t)
xk
(k 1)T
kT
1
1
0 1
1
..
..
A=
T
0
0
0
0
Matrices
k = 1, . . . , n 1
(k + 1)T
0
1
..
0
0
0
..
...
1
1
0
0
..
0
1
2-11
Linearization
derivative or Jacobian matrix of f : Rn Rm
f1(
x)/x1 f1(
x)/x2 f1(
x)/xn
f2(
x
)/x
f
(
x
)/x
f
(
x
)/x
1
2
2
2
n
Df (
x) =
..
..
..
fm(
x)/x1 fm(
x)/x2 fm(
x)/xn
faff (x) = f (
x) + Df (
x)(x x
)
an affine function of x
a good approximation of f (x) for x around x
Matrices
2-12
Matrix-matrix product
product of m n-matrix A with n p-matrix B:
(AB)ij = ai1b1j + ai2b2j + + ainbnj
dimensions must be compatible: # of columns in A = # of rows in B
AB 6= BA in general! (even if the dimensions make sense)
1 0
0 1
0 1
1 0
6=
0 1
1 0
1 0
0 1
2-13
Operator interpretation
y = (AB)x = A(Bx)
z = Bx
y = Az = ABx
1 0
0 1
0 1
1 0
x1
x2
swaps the two elements of x; then changes the sign of the first element
0 1
1 0
x1
f (x) =
1 0
0 1
x2
changes the sign of first element of x; then swaps the two elements
Matrices
2-14
Exercise
undirected graph
n vertices (nodes)
undirected edges (links) between certain pairs of vertices i, j
Matrices
2-15
Orthogonal matrices
a matrix Q is orthogonal if
QT Q = I
examples
1/3 1/6
1/ 3 1/ 6 ,
1/ 3 2/ 6
Q = I 2uuT
Matrices
0 1 0
0 0 1 ,
1 0 0
cos sin
sin cos
2-16
Column properties
denote the columns of Q by qk :
Q=
then
T
Q Q=
q1 q2 qn
q1T q1
q2T q1
q1T q2
q2T q2
..
..
...
q1T qn
q2T qn
..
=I
Matrices
2-17
Matrices
2-18
Norm of a matrix
m n-matrix A defines a linear function f (x) = Ax
x
y = Ax
Matrices
2-19
1 0 0
0 2 0
A=
.
.
.
.
.
.. .
.
0
0 n
then kAk = maxi=1,...,n |i|
orthogonal matrix: kAk = 1
for general A, we have to use a numerical algorithm (MATLAB: norm(A))
Matrices
2-20
2-21
2-22