Академический Документы
Профессиональный Документы
Культура Документы
Vectors
We will next give a brief review of some concepts from Linear Algebra
that will help in the understanding of Matrix Representations of
Graphs and also in the discussion of Dynamical Systems later in the
course.
Definition
An n-dimensional vector is a column array of real numbers
v1
v2
v = . vi ∈ R, i = 1, . . . , n
..
vn
v = [v1 , v2 , . . . , vn ]T
Definition
An n × n matrix A is an array with n rows and m columns
a11 a12 . . . a1m
a21 a22 . . . a2m
A= .
.. .. ..
.. . . .
an1 an2 . . . anm
We write A = (aij ) with aij meaning the element in row i and column j
[ai1 , ai2 , . . . , aim ] is the
i-th row vector
a1j
a2j
[a1j , a2j , . . . , anj ]T = . is the j-th column vector
..
anj
Example
1 2 3 4
A= 5 6 7 8
9 10 11 12
is a 3 × 4 matrix.
[5, 6, 7, 8] is the second
row vector or row two
1
[1, 5, 9]T = 5 is column one.
9
The transpose matrix AT is the 4 × 3 matrix
1 5 9
2 6 10
AT = 3 7 11
4 8 12
Definition
Given vectors x = [x1 , . . . , xn ]T and y = [y1 , . . . , yn ]T , the inner
product or dot product, or scalar product denoted by
< x, y > or x · y or xT y
is a scalar (number)
y1
y2
xT y = x1 y1 + x2 y2 + · · · + xn yn = [x1 , x2 , . . . xn ]
..
.
yn
Example
Let x = [1, 2, 3]T and y = [4, 5, 6]T be two vectors in R3 . Then
xT y = 1 · 4 + 2 · 5 + 3 · 6 = 32
Definition
The norm or length of a vector x = [x1 , x2 , . . . , xn ]T is given by
√ n
1 1
X
||x|| = xT x = (x21 + x22 + . . . x2n ) 2 = ( x2i ) 2
i=1
Example
Suppose
1 −1 1 3 0 1
A= 2 1 3 ; B= 0 1 2
−2 1 4 −2 2 −1
then
1 1 −2
C= 0 7 1
−14 5 −4
Example
Consider the matrix
0 1 0 1
1 0 1 0
A=
0
1 1 1
1 0 1 0
Then it is easy to see that AT = A, so A is a symmetric matrix.
Definition
The matrix
1 0 ... 0
0 1 ... 0
I=
.. .. ..
. . .
0 0 ... 1
is the n × n Identity Matrix
Definition
The Inverse of an n × n matrix A is an n × n matrix B satisfying
AB = BA = I
can be written as
Ax = b
with
a11 a12 ... a1m x1 b1
a21 a22 ... a2m x2 b2
A= ; x= ; b=
.. .. .. .. .. ..
. . . . . .
an1 an2 ... anm xm bm
ax + by = 0
cx + dy = 0
ad − bc = 0
a b
This quantity is called the Determinant of the matrix .
c d
Mark W. Spong Dynamics of Complex Networks and Systems
Review of Linear Algebra
Determinant and Inverse
Definition
The Cofactor cij of an element aij in an n × n matrix A is ±1 times the
determinant of the (n − 1) × (n − 1) matrix formed by deleting the i-th
rown and j-th column of A.
The sign in front of each cofactor alternates according to the pattern
+ − + −
− + − +
+ − + − sign pattern for the 4 × 4 case.
− + − +
Example
Back to the previous 3 × 3 matrix
a b c
d e f
g h i
we can take any row or column, for example, column two, and compute
the determinant as
d f a c a c
= −b + e − h
g i g i d f
= −b(di − f g) + e(ai − gc) − h(af − dc)
= −bdi + bf g + eai − egc − haf + hdc
One can check that this is the same expression as computed previously.
Theorem
The inverse of an n × n matrix exists if and only if the Determinant,
det(A), is not equal to zero.
If A and B are invertible, then the product AB is invertible and
(AB)−1 = B −1 A−1 .
Mark W. Spong Dynamics of Complex Networks and Systems
Review of Linear Algebra
Determinant and Inverse
Ax = b
3x − y = 4
6x − 2y = 8
The coefficient matrix A is singular in this case and any point on the line
y = 3x − 4 is a solution.
Example
On the other hand, the linear system
3x − y = 4
6x − 2y = 2
has no solution.
Example
The linear system
3x − y = 4
6x + 2y = 2
a b d −b
Let A = and B =
c d −c a
Then a direct calculation shows
a b d −b ad − bc 0
AB = =
c d −c a 0 ad − bc
Example
The cofactors of the given matrix are
4 5 0 5 0 4
c11 = = 24 c12 = − = 5 c13 =
= −4
0 6 1 6 1 0
2 3 1 3 1 2
c21 = − = −12 c22 = = 3 c23 = −
=2
0 6 1 6 1 0
2 3 1 3 1 2
c31 = = −2 c32 = − = −5 c33 = 0 4 =4
4 5 0 5
Example
Therefore, the Cofactor Matrix is
24 5 −4
C = −12 3 2
−2 −5 4
Definition
Given an n × n matrix A, the Trace of the matrix is
n
X
T r(A) = a11 + a22 + · · · + ann = aii
1
In other words, the Trace is the sum of the diagonal entries of the
matrix.
Definition
Suppose we find a scalar λ and a vector x satisfying the equation
Ax = λx
Example
3 −1 1 41
= =4
−1 3 −1 −4
−1
3 −1
Therefore λ = 4 is an eigenvalue for the matrix A = and
−1 3
1
x= is an eigenvector for λ.
−1
(A − λI)x = 0
Theorem
If A is a real, symmetric matrix then the eigenvalues of A are real.
Example
Back to the previous matrix
3 −1
A=
−1 3
Then
3−λ −1
det(A − λI) = det( ) = λ2 − 6λ + 8 = (λ − 4)(λ − 2)
−1 3−λ
Example
For λ = 4, the system of equations become
−1 −1 x1 0
=
−1 −1 x2 0
x1 1
Thus, x2 = −x1 and so = is an eigenvector for λ = 4.
x2 −1
For λ = 2, the system of equations become
1 −1 x1 0
=
1 −1 x2 0
x1 1
Thus, x2 = +x1 and so = is an eigenvector for λ = 2.
x2 1
Definition
Vectors v1 and v2 are said to be Linearly Dependent if and only if there
are constants α1 and α2 such that
α1 v1 + α2 v2 = 0
A[v1 v2 ] = [λ1 v1 λ2 v2 ]
Example
In the previous example, with
3 −1 1 1
A= ; and T =
−1 3 1 −1
and
−1 1 1 1 3 −1 1 1 2 0
T AT = =
2 1 −1 −1 3 1 −1 0 4
Remark
1) The determinant of a square matrix A is the product of the
eigenvalues, i.e.,
|A| = λ1 λ2 · · · λn = Πni=1 λi
2) The trace of a square matrix A is the sum of the eigenvalues, i.e.,
n
X
T r(A) = λ1 + λ2 + · · · + λn = λi
i=1
|T −1 AT | = |A|
T r(T −1 AT ) = T r(A)
V (x) = xT P x
Example
The quadratic form
can be written as
V (x) = xT P x
where
p11 p12
P =
p21 p22
xT P x ≥ 0 for all x 6= 0
Theorem
A matrix P is Positive Definite if and only if all eigenvalues of P are
positive.
A matrix P is Positive Semi-Definite if and only if all eigenvalues of P
are non-negative.
Definition
Let
p11 p12 ... p1n
p21 p22 ... p2n
P =
.. .. .. ..
. . . .
pn1 pn2 ... pnn
be an n × n matrix.
The Principal Minors of P are
p11 p12 p13
p p12
M2 = 11
M1 = p11 ; ; M3 = p21 p22 p23
p21 p22
p31
p23 P33
. . . ; Mn = |P |
Remark
If the matrix P can be written as P = C T C for some matrix C, then P
is Positive Semi-Definite.
xT P x = xT C T Cx = y T y ≥ 0 with y = Cx