Appendix A. Linear Algebra, Lecture notes of Linear Algebra

and vectors as well as of matrix and vector operations, the goal of this appendix is to provide a brush-up of linear algebra. A.I Definitions.

Typology: Lecture notes

2022/2023

Uploaded on 05/11/2023

kourtney
kourtney 🇺🇸

4.8

(6)

220 documents

1 / 15

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Appendix A. Linear Algebra
(A.
1)
Since modelling and control of robot manipulators requires an extensive use of matrices
and vectors as well as of matrix and vector operations, the goal of this appendix is to
provide a brush-up of linear algebra.
A.I Definitions
Amatrix of dimensions (m x n), with m and npositive integers, is an array of
elements
aij
arranged into m rows and n columns:
r
all
aIZ aIn]
aZI azz aZn
A
=
[aijL
=
1
m
= . . .
""'.
.
j
=
1, ...
,n' .
amI amz ... amn
If
m
=
n, the matrix is said to be square; if m <n, the matrix has more columns than
rows; if m >
n
the matrix has more rows than columns. Further, if
n
=
1, the notation
(A.
1) is used to represent a (column) vector
a
of dimensions (m x 1)1; the elements
ai
are said to be vector components. A square matrix
A
of dimensions
(n
x
n)
is said
to be upper triangular if
aij
=
0 for
i
>
j:
o
the matrix is said to be lower triangular if
aij
=
0 for
i
<
j.
An (n xn) square matrix Ais said to be diagonal if
aij
=
0 for
i
:/=
j,
i.e.,
o
o
~ ] =diag{all,azz, ... ,ann}.
ann
1According to standard mathematical notation, small boldface is used to denote vectors while
capital boldface is used to denote matrices. Scalars are denoted by roman characters.
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Appendix A. Linear Algebra and more Lecture notes Linear Algebra in PDF only on Docsity!

Appendix A. Linear Algebra

(A. 1)

Since modelling and control of robot manipulators requires an extensive use of matrices and vectors as well as of matrix and vector operations, the goal of this appendix is to provide a brush-up of linear algebra.

A.I Definitions

A matrix of dimensions (m x n), with m and n positive integers, is an array of

elements aij arranged into m rows and n columns:

r

all aIZ aIn]

aZI azz aZn

A = [aijL = (^1) ""'. m =. ... j = 1, ... ,n'.

amI amz ... amn

If m = n, the matrix is said to be square; if m < n, the matrix has more columns than rows; if m > n the matrix has more rows than columns. Further, if n = 1, the notation (A. 1) is used to represent a (column) vector a of dimensions (m x 1)1; the elements

ai are said to be vector components. A square matrix A of dimensions (n x n) is said

to be upper triangular if aij = 0 for i > j:

o

the matrix is said to be lower triangular if aij = 0 for i < j.

An (n x n) square matrix A is said to be diagonal if aij = 0 for i :/= j, i.e., o

o

~ ] =diag{all,azz, ... ,ann}.

ann

1 According to standard mathematical notation, small boldface is used to denote vectors while capital boldface is used to denote matrices. Scalars are denoted by roman characters.

(A.2)

336 Modelling and Control of Robot Manipulators

If an (n x n) diagonal matrix has all unit elements on the diagonal (aii = 1), the matrix

is said to be identity and is denoted by In^2 • A matrix is said to be null if all its elements are null and is denoted by O. The null column vector is denoted by O.

The transpose AT of a matrix A of dimensions (m x n) is the matrix of dimensions

(n x m) which is obtained from the original matrix by interchanging its rows and columns:

[

all a

A^ T^ = a.^12 a

aln a2n The transpose of a column vector a is the row vector aT.

An (n x n) square matrix A is said to be symmetric if AT = A, and thus aij = aj;:

a1n 1 a~n.

ann

An (n x n) square matrix A is said to be skew-symmetric if AT = -A, and thus

aij = -aji for i :/= j and aii = 0, leading to

[-~"

a ... 0 ...^ a,.a2n^1 A=.

-aln -a2n ... 0 A partitioned matrix is a matrix whose elements are matrices (blocks) of proper dimensions:

[

All A^12_... A1n_^ 1

A 21 A 22 ... A2n

A=.. (^)...

AmI Am2 ... Amn A partitioned matrix may be block-triangular or block-diagonal. Special partitions of a matrix are that by columns

A = [al a2 ... (^) an] and that by rows

[ail

ar

A= ..

aT m

2 Subscript n is usually omitted if the dimensions are clear from the context.

338 Modelling and Control of Robot Manipulators

whose elements are given by Cij = L~=1 aikbkj. The following properties hold:

A = Alp = ImA

A(BC) = (AB)C

A(B+C) =AB+AC

(A + B)C = AC + BC

(AB)T = BT AT.

Notice that, in general, AB :/= BA, and AB = 0 does not imply that A = 0 or

B = 0; further, notice that AC = BC does not imply that A = B.

If an (m x p) matrix A and a (p x n) matrix B are partitioned in such a way that

the number of blocks for each row of A is equal to the number of blocks for each

column of B, and the blocks Aik and Bkj have dimensions compatible with product,

the matrix product AB can be formally obtained by operating by rows and columns

on the blocks of proper position and treating them like elements. For an (n x n) square matrix A, the determinant of A is the scalar given by the

following expression, which holds 'Vi = 1, ... , n:

n det(A) = I:>ij( -1)i+jdet(A(ij)). j=l

(A.9)

The determinant can be computed according to any row i as in (A.9); the same result

is obtained by computing it according to any column j. If n = 1, then det( all) = all'

The following property holds:

det(A) = det(AT).

Moreover, interchanging two generic columns p and q of a matrix A yields

As a consequence, if a matrix has two equal columns (rows), then its determinant is

null. Also, it is det(aA) = andet(A).

Given an (m x n) matrix A, the determinant of the square block obtained by selecting an equal number k of rows and columns is said to be k-order minor of matrix A. The minors obtained by taking the first k rows and columns of A are said to be principal minors. If A and B are square matrices, then

det(AB) = det(A)det(B).

If A is an (n x n) triangular matrix (in particular diagonal), then

n det(A) = II aii· i=

(A. 10)

Linear Algebra 339

More generally, if A is block-triangular with m blocks Aii on the diagonal, then

m det(A) IT det(Aii). i=l

A square matrix A is said to be singular when det(A) = O. The rank g(A) of a matrix A of dimensions (m x n) is the maximum integer r so

that at least a non null minor of order r exists. The following properties hold:

a(A) :::;min{m,n} p(A) = g(AT) p(AT^ A) = p(A) p(AB) :::;min{p(A), p(B)}.

A matrix so that p(A) = min{m, n} is said to befull-rank.

The adjoint of a square matrix A is the matrix

Adj A = [( -l)i+jdet(A(ij»)]~ = 1, .. ,n'

j = 1, .. ,n

(A.ll)

An (n x n) square matrix A is said to be invertible if a matrix A -I exists, termed

inverse of A, so that A-IA = AA-I^ = In.

Since p(In) = n, an (n x n) square matrix A is invertible if and only if a(A) = n,

i.e., det(A) :/= 0 (nonsingular matrix). The inverse of A can be computed as

A-I _ 1

- det(A) Adj A.

The following properties hold:

(A-I)-I = A

(AT)-l = (A-1)T.

If the inverse of a square matrix is equal to its transpose

then the matrix is said to be orthogonal; in this case it is

If A and B are invertible square matrices of the same dimensions, then

(A. 12)

(A.B)

(A. 14)

(A. 15)

Linear Algebra 341

Further, if x(t) is a differentiable function with respect to t, then

. d of T f(x) = dtf(x(t)) = ax x = gradxf(x)x. (A.20)

Given a vector function g(x) of dimensions (m x 1), whose elements gi are differ- entiable with respect to the vector x of dimensions (n x 1), the Jacobian matrix (or simply Jacobian) of the function is defined as the (m x n) matrix

Jg(x) = og(x) ax =

Ogl (x) ax Og2(X) ax (^) (A.21)

If x(t) is a differentiable function with respect to t, then

g(x) = ~g(x(t)) = ;: x = Jg(x)x.

A.3 Vector Operations

(A.22)

Given n vectors Xi of dimensions (m x 1), they are said to be linearly independent if the expression

holds only when all the constants ki vanish. A necessary and sufficient condition for the vectors Xl, X2 ... ,Xn to be linearly independent is that the matrix

has rank n; this implies that a necessary condition for linear independence is that n ~ m. If instead g(A) = r < n, then only r vectors are linearly independent and the remaining n - r vectors can be expressed as a linear combination of the previous ones.

A system of vectors X is a vector space on the field of real numbers lR if the

operations of sum of two vectors of X and product of a scalar by a vector of X have values in X and the following properties hold:

342 Modelling and Control of Robot Manipulators

\fx,y E X \fx,y,z E X \fx E X

\fx E X \fa,j3 E IR \fx E X \fa,j3 E IR \fx E X \fa E IR \fx,y E X.

a(j3x) = (aj3)x

(a+j3)x=ax+j3x a(x + y) = ax + ay

x+y=y+x

(x + y) + Z = x + (y + z)

30 EX: x +0 = X

\fXEX, 3(-x)EX:x+(-x)= Ix = x

The dimension of the space dim(X) is the maximum number of linearly indepen- dent vectors x in the space. A set {Xl, X2, ... ,xn} of linearly independent vectors is

a basis of vector space X, and each vector y in the space can be uniquely expressed

as a linear combination of vectors from the basis:

(A.23)

where the constants CI , C2, ••• , Cn are said to be the components of the vector y in the basis {Xl, X2,· .. ,xn}. A subset Y of a vector space X is a subspace Y ~ X if it is a vector space with the operations of vector sum and product of a scalar by a vector, i.e.,

ax + j3y E Y \fa,j3EIR \fx,yEY.

According to a geometric interpretation, a subspace is a hyperplane passing by the origin (null element) of X. The scalar product < x, y > of two vectors x and y of dimensions (m x 1) is the scalar that is obtained by summing the products of the respective components in a given basis:

< x, Y >= XlYl + X2Y2 + ... + XmYm = X l'^ Y = Y l'x. (A.24)

Two vectors are said to be orthogonal when their scalar product is null:

(A.25)

The norm of a vector can be defined as

IIxli = v'xl'x. (A.26)

It is possible to show that both the triangle inequality

IIx + yll ~ IIxli + Ilyll (A.27)

and the Schwarz' inequality

Ixl'^ yl ~ IIxllllyll (A.28)

344 Modelling and Control of Robot Manipulators

A.4 Linear Transformations

Consider a vector space X of dimension n and a vector space Y of dimension m with m ~ n. The linear transformation between the vectors x E X and y E Y can be defined as y=Ax (A.34)

in terms of the matrix A of dimensions (m x n). The range space (or simply range) of the transformation is the subspace

R(A) = {y : y = Ax, x E X} ~ Y, (A.35)

which is the subspace generated by the linearly independent columns of matrix A taken as a basis of y. It is easy to recognize that

g(A) == dim(R(A)). (^) (A.36)

On the other hand, the null space (or simply null) of the transformation is the subspace

N(A) = {x : Ax = 0, x E X} ~ X.

Given a matrix A of dimensions (m x n), the notable result holds:

g(A) + dim(N(A)) = n.

(A.37)
(A.38)

Therefore, if g(A) = r ~ min{m,n}, then dim(R(A)) = rand dim(N(A)) = n - r. It follows that if m < n, then N(A) :/= 0 independently of the rank of A; if

m == n, thenN(A) :/= 0 only in the case of g(A) = r < m.

If x E N(A) and y E R(AT), then yT x = 0, i.e., the vectors in the null space

of A are orthogonal to each vector in the range space of the transpose of A. It can

be shown that the set of vectors orthogonal to each vector of the range space of AT

coincides with the null space of A, whereas the set of vectors orthogonal to each vector

in the null space of AT coincides with the range space of A. In symbols:

(A.39)

where .1denotes the orthogonal complement of a subspace. A linear transformation allows defining the norm of a matrix A induced by the

norm defined for a vector x as follows. In view of the property

the norm of A can be defined as

IIAxll ~ IIAllllxll,

IIAII = sup IIAxl

:1:#0 Ilxll

(A.40)

(A.41)

Linear Algebra 345

which can be computed also as

max IIAxll.

Ilxll=l

A direct consequence of (A.40) is the property

IIABII ::; IIAIIIIBII·

A.5 Eigenvalues and Eigenvectors

(A.42)

Consider the linear transformation on a vector u established by an (n x n) square

matrix A. If the vector resulting from the transformation has the same direction of u

(with u :/= 0), then Au=..\u. The equation in (A.43) can be rewritten in matrix form as

(..\1 - A)u = O.

(A.43)
(A.44)

For the homogeneous system of equations in (A.44) to have a solution different from

the trivial one u = 0, it must be

det(..\I - A) = 0 (A.45)

which is termed characteristic equation. Its solutions "\1, ... ,..\n are the eigenvalues

of matrix A; they coincide with the eigenvalues of matrix AT. On the assumption of

distinct eigenvalues, the n vectors Ui satisfying the equation

(..\iI - A)Ui = 0 i =^ 1, ...^ ,n^ (A.46)

are said to be the eigenvectors associated with the eigenvalues ..\i. The matrix U formed by the column vectors Ui is invertible and constitutes a basis in the space of dimension n. Further, the similarity transformation established by U: A = U-1AU (A.47)

is so that A = diag{..\l' ... ,..\n}. It follows that det(A) = n:1.Ai. If the matrix A is symmetric, its eigenvalues are real and A can be written as A=UTAU;

hence, the eigenvector matrix U is orthogonal.

A.6 Bilinear Forms and Quadratic Forms

A bilinear form in the variables Xi and Yj is the scalar m n B = L L aijxiYj i=l j=l

(A.48)

Linear Algebra 347

gradxB(x,y) = (OB(X,y))Tox = Ay, (A.55)

dimension, and specifically the form vanishes when x E N(A). A typical example of

a positive semi-definite matrix is the matrix A = HT^ H where H is an (m x n) matrix

with m < n. In an analogous way, a negative semi-definite matrix can be defined. Given the bilinear form in (A.49), the gradient of the form with respect to x is given by

whereas the gradient of B with respect to y is given by

gradyB(x, y) = (oB(X,oy y)) T = ATx. (A.56)

Given the quadratic form in (A.50) with A symmetric, the gradient of the form with

respect to x is given by

gradxQ(x) = (oQ(X))ox T = 2Ax. (A.57)

Further, if x and A are differentiable functions of t, then

. d T T' Q(x) = dtQ(x(t)) = 2x Ax + x Ax; (A.58)

if A is constant, then the second term obviously vanishes.

A.7 Pseudo-inverse

The inverse of a matrix can be defined only when the matrix is square and nonsingular. The inverse operation can be extended to the case of non-square matrices. Given a

matrix A of dimensions (m x n) with g(A) = min {m, n },if n < m, a left inverse

of A can be defined as the matrix Al of dimensions (n x m) so that

If instead n > m, a right inverse of A can be defined as the matrix A,. of dimensions (n x m) so that

AAr = 1 m.

If A has more rows than columns (m > n) and has rank n, a special left inverse is the matrix (A. 59)

which is termed left pseudo-inverse, since At A = In. If WI is an (m x m) positive

definite matrix, a weighted left pseudo-inverse is given by

(A.60)

348 Modelling and Control of Robot Manipulators

If A has more columns than rows (m < n) and has rank m, a special right inverse is the matrix (A.61)

which is termed right pseudo-inverse, since AAt = 1 m^3. If WT is an (n x n) positive

definite matrix, a weighted right pseUdo-inverse is given by

(A.62)

The pseudo-inverse is very useful to invert a linear transformation y = Ax with A

a full-rank matrix. If A is a square nonsingular matrix, then obviously x = A-I y and

then At = At = A-I.

If A has more columns than rows (m < n) and has rank m, then the solution x for a given y is not unique; it can be shown that the expression

(A.63)

with k an arbitrary (n x 1) vector and At as in (A.61), is a solution to the system

of linear equations established by (A.34). The term At y E A(l· (A) == R(AT)

minimizes the norm of the solution Ilxll, while the term (1 - At A)k is the projection

of kin N(A) and is termed homogeneous solution.

On the other hand, if A has more rows than columns (m > n), the equation in (A.34) has no solution; it can be shown that an approximate solution is given by

x = Aty

where At as in (A. 59) minimizes lIy - Axil.

A.S Singular Value Decomposition

(A.64)

For a nonsquare matrix it is not possible to define eigenvalues. An extension of the

eigenvalue concept can be obtained by singular values. Given a matrix A of dimensions

(m x n), the matrix AT A has n nonnegative eigenvalues Al 2': A2 2: ... 2: An 2: 0 (ordered from the largest to the smallest) which can be expressed in the form

The scalars (T1 2': (T2 2': ... 2: (Tn 2: 0 are said to be the singular values of matrix A. The singular value decomposition (SVD) of matrix A is given by

(A.65)

3 Subscripts 1 and r are usually omitted whenever the use of a left or right pseudo-inverse is clear from the context.