2. Calculus of Vector & Matrix
Calculus of Vectors & Matrices
Reason:
Since the state space representation of dynamic systems is in terms of vectors and matrices, we need
to understand the calculus of vectors and matrices and its operations when we study their dynamic
behaviors.
In this course we assume that
“a given vector x(t) or matrix A(t) is continuous, if all its elements xi(t) or aij(t) are continuous
functions of t.”
3/26/2022 2
3. Calculus of Vector & Matrix
a) Integral and Derivative
The integral or derivative of an n1 vector x(t) w.r.t. a scalar t is a vector of integrals or
derivative of its elements.
and
3/26/2022 3
1
2
( ) ( )
( )
( )
( )
i
n
t dt x t dt
x t dt
x t dt
x t dt
x
1
2
( ) ( )
( )
( )
( )
i
n
d d
dt dt
d
dt
d
dt
d
dt
t x t
x t
x t
x t
x
4. Calculus of Vector & Matrix
The integral or derivative of an nn matrix A(t) w.r.t. a scalar t is a matrix of integrals or
derivative of each individual element.
and
The derivative of a product of two conformable matrices A(t) and B(t) is given as
3/26/2022 4
11 12 1
21 22 2
1 2
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
ij
n
n
n n nn
t dt a t dt
a t dt a t dt a t dt
a t dt a t dt a t dt
a t dt a t dt a t dt
A
11 12 1
21 22 2
1 2
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( )
n
n
n n nn
d d
t t
dt dt
d d d
a t a t a t
dt dt dt
d d d
a t a t a t
dt dt dt
d d d
a t a t a t
dt dt dt
A A
( ) ( )
{ ( ) (t)} ( ) ( )
d t d t
d t t t
dt dt dt
A B
A B B A
5. Calculus of Vector & Matrix
Theorem: If F(t) is square and nonsingular, then the derivative of the matrix inverse is
Proof: Since
and
we have
or
Pre-multiply both sides by F1
(t), we have
End
3/26/2022 5
1 1 1
( ) ( ){ ( )} ( )
d d
t t t t
dt dt
F F F F
1
1 1
( ) ( )
[ ( ) ( )] ( ) ( )
d t d t
d t t t t
dt dt dt
F F
F F F F
1
[ ( ) ( )] ( )
d d
t t t
dt dt
F F I 0
1
1
( ) ( )
( ) ( )
d t d t
t t
dt dt
F F
F F 0
1
1
( ) ( )
( ) ( )
d t d t
t t
dt dt
F F
F F
1 1 1
( ) ( ){ ( )} ( )
d d
t t t t
dt dt
F F F F
6. Calculus of Vector & Matrix
Fundamental Theorem of Calculus
The fundamental theorem of calculus in the matrix case is
Leibniz Rule
The Leibniz rule in matrix case has the form
Also we have
3/26/2022 6
0 ( ) ( )
t
d
dt
d t
A A
( ) ( )
( ) ( )
( , ) ( , ( )) ( ) ( , ( )) ( ) ( , )
g t g t
f t f t
d t d t g t g t t f t f t t d
dt t
A A A A
0
0 0
( ) ( )
|| || || || ,
t t
d d t t
x x
7. Calculus of Vector & Matrix
b) Differentiation of Scalar Function w.r.t. Vector
(1) If f(x) is a differentiable scalar-valued function of an n-vector x, then
and
Here df(x)/dx is called the gradient of f with respect to x and denoted as xf(x).
3/26/2022 7
1
2
( )
( )
( )
( )
n
df
dx
df
dx
df
dx
df
d
x
x
x
x
x
2 2 2
2
1 2 1
1
2 2 2
2
2
2 1 2
2
2
2 2 2
2
1 2
( ) ( ) ( )
( ) ( ) ( )
( )
( ) ( ) ( )
n
n
n n n
df df df
dx dx dx dx
dx
df df df
df
dx dx dx dx
dx
d
df df df
dx dx dx dx dx
x x x
x x x
x
x
x x x
8. Calculus of Vector & Matrix
(2) If f(x) is an inner product of two vectors x and y, then the gradient vector can be
expressed as
Proof: Let vectors x and y as
Then we have
and their derivatives are
and
End
3/26/2022 8
and
T T
x y y x
y y
x x
1 1
2 2
and
n n
x y
x y
x y
x y
1 1 2 2
T T
n n
x y x y x y
x y y x
1 1
2
2
T
T T
T
n
n
x y
y
x
y
x
x y
x y x y
y
x
x y
1 1
2
2
T
T T
T
n
n
x y
y
x
y
x
y x
y x y x
y
x
y x
9. Calculus of Vector & Matrix
(3) For a scalar-valued function f(x) = xTAx,
If matrix A is symmetrical, the gradient vector can be expressed as
and
3/26/2022 9
( )
T T
x Ax A A x
x
2
T
x Ax Ax
x
2
2
2
T
x Ax A
x
10. Calculus of Vector & Matrix
c) Differentiation of Vector w.r.t. Vector
For a vector function z(x), we have
This matrix is called the Jacobian matrix and written as Jx[z(x)], i.e.,
3/26/2022 10
{ ( )} i
j
z
d
J
d x
x
z
z x
x
1 1 1
1 2
2 2 2
1 2
1 2
n
n
n n n
n
z z z
x x x
z z z
d
x x x
d
z z z
x x x
z
x
11. Calculus of Vector & Matrix
d) Partial Derivatives
Consider the functions f = f(y, x, t), y = y(x, t), and x = x(t). We define the following operations:
and
Similar operations on the vector functions z = z(y, x, t), y = y(x, t), and x = x(t) are
and
The second partial of a scalar z(x), with respect to a vector x, is a matrix denoted by
The above matrix is called the Hessian matrix of z.
3/26/2022 11
T
df f f
d
y
x x y x
T T
T
df d f
f f f
dt dt t t
x y
y
x x y y
T
d
d
z y z
z
x x x
y
d d
d d
dt dt t
dt dt
z x z
z y x y z
y x x
2 2
2
i j
z z
x x
x
12. Calculus of Vector & Matrix
e) Taylor Series Expansion
The Taylor series expansion of a vector function of vector x about x0 is defined as
3/26/2022 12
0 0
0
0 0
0
0
0 0
0
( )
( ) ( ) ( )
( )
1 ( ) ( )
2!
( )
1 ( ) ( ) ( )
3!
T
T
T
T
T
f
f f
f
f
x x
x x
x x
x
x x x x
x
x
x x x x
x x
x
x x x x x x
x x x
higher-order terms