Beruflich Dokumente
Kultur Dokumente
Vectors
• A column vector is a list of numbers stored vertically. The dimension of a column vector
is the number of values in the vector. W is a 3-dimensional column vector and V is a
5-dimensional column vector:
−1
3 0
W = −1 V = 4 .
0
2
−5
Subscripts are used to denote single elements of the vector. For example, W2 = −1, V4 = 2.
• A row vector is a list of numbers stored horizontally. The dimension of a row vector is the
number of values in the vector. U is a 4-dimensional row vector and T is a 2-dimensional
row-vector:
U= 2 −4 0 0 .
T = 4 3 .
1
• Two vectors with a common dimension can be added or subtracted:
2 −4 0 0 + 0 1 1 −3 = 2 −3 1 −3 .
3 6
2 −1 = −2 .
0 0
3 4 3 −2 1 −1 = 10 11 .
• Geometrically, a vector V can be viewed as a line segment in d-dimensional space with its
tail at the origin and its head at the point V .
V
1
U
-1
-2
-3
-4
-4 -3 -2 -1 0 1 2 3 4
2
• The scalar product (also called the dot product or inner product) is formed from two vectors
V and W having the same dimension. The scalar product is a single number (a “scalar”),
and is notated V · W or hV, W i. The definition of the scalar product is
X
V ·W = Vi Wi .
i
V · W = 3 · −1 + 1 · 0 + −1 · 1 = −4.
U · T = 4 · 0 + −1 · −1 + 0 · −1 + 4 · 2 = 9.
• If two d-dimensional vectors U and V have inner product 0, hU, V i = 0, then U and V are
orthogonal, or perpendicular.
Viewing 2-dimensional vectors as points in the plane,
! !
x1 x2
V = U= ,
y1 y2
then hV, U i = 0 when V and U are perpendicular in the geometric sense (the angle between
them is π/2 radians).
V
1
-1
U
-2
-3
-4
-4 -3 -2 -1 0 1 2 3 4
3
• A linear combination of d-dimensional vectors V1 , V2 , . . . , Vm is an expression of the form
c1 V1 + c2 V2 + · · · + cm Vm ,
2 0 −1
3 0 −6
1 1 1
V1 = ,
V2 = ,
V3 = ,
−3 −1 3
2 2 2
3 5 −6
0 0 −2
V1 = , V2 = , V3 = ,
−3 −1 3
2 2 2
From the second line, c3 = 0, and from the final line c2 = −c1 . From the third line, c2 = −3c1 ,
so we conclude c1 = c2 = 0, hence V1 , V2 , V3 are linearly independent.
4
• It is a fact that any set of m > d d-dimensional vectors must be linearly dependent. For
example, there can never be a set of 4 linearly independent vectors having dimension 3.
Matrices
• A m × n matrix A is a m × n array of numbers, where Mij refers to the value in the ith row
and j th column. For example, the following is a 2 × 3 matrix
!
4 3 0
A= ,
−1 0 −2
1 −2
B = −1 3
,
2 0
! ! !
4 3 0 0 −2 3 4 1 3
+ = ,
−1 0 −2 4 4 −1 3 4 −3
! !
4 3 0 12 9 0
3 = ,
−1 0 −2 −3 0 −6
! ! !
2 2 −1 1 2 0 1 −2 −2
2 −3 = .
0 0 4 −1 2 −3 3 −6 17
5
• A n-dimensional column vector is also a n × 1 matrix. A n-dimensional row vector is also a
1 × n matrix.
• The transpose of an m × n matrix A, written A0 , is an n × m matrix where A0ij = Aji . For
example,
!0 4 −1
4 3 0
3
= 0
,
−1 0 −2
0 −2
!
4 3
S=
3 5
is symmetric, while
!
4 3
T =
6 5
is not.
• If A is a m × n matrix and V is a n-dimensional column vector, we can form the matrix
vector product W = AV , where Wi is the dot product of V with row i of A. For example,
! ! ! !
2 −1 3 3 · 2 + −1 · −1 7
= = .
1 4 −1 3 · 1 + −1 · 4 −1
6
• The nullspace of M , written Null(M ), is the set of all vectors V such that M V = 0. For
example, if
!
2 −1 4
0 1 2
then
3
2
V =
−1
is in Null(M ).
The zero vector is always in Null(M ), and if the columns of M are linearly independent, the
zero vector is the only vector in Null(M ). But if the columns of M are linearly dependent,
there will be infinitely many nonzero vectors in Null(M ).
A square (m × m) matrix with nullspace containing only the zero vector is nonsingular,
otherwise it is singular. Equivalently, a square matrix is nonsingular if and only if its
columns are linearly independent.
• If A is a m × n matrix and B is a n × r matrix, we can form the matrix matrix product
C = AB, where C is a m × r matrix whose elements are defined as: Cij is the dot product
of row i of A with column j of B. For example,
! 3 −1 !
2 −1 1 7 −3
1 0
= ,
1 0 4 11 −5
2 −1
7
Rectangular matrices can only be multiplied if the number of columns in the first matrix is
equal to the number of rows in the second matrix (i.e. AB can be formed only if A is m × n
and B is n × r).
For square matrices, the products AB and BA can both be formed. However it is important
to note that they are different:
! ! !
2 −1 3 −1 5 −2
= ,
1 4 1 0 7 −1
! ! !
3 −1 2 −1 5 −7
= .
1 0 1 4 2 −1
• For any matrix m × n matrix A, the products A0 A and AA0 can always be formed. The first
product is n × n and the second product is m × m.
The product A0 A is the “column-wise inner product matrix”, since (A0 A)ij is the inner
product of the ith column of A with the j th column of A.
The product AA0 is the “row-wise inner product matrix”, since (AA0 )ij is the inner product
of the ith row of A with the j th row of A.
8
For example, if
!
2 −1 1
A= ,
1 0 4
then
5 −2 6
0
A A = −2 1 −1
,
6 −1 17
and
!
0 6 6
AA = .
6 17
1 0 0 0
0 1 0 0
I=
0 0 1 0
0 0 0 1
The identity matrix acts like “1” for matrix multiplication: AI = A and IA = A (if A is
m×n, the first I is the m×m identity matrix, and the second I is the n×n identity matrix).
9
• If A is a square (n × n) matrix with linearly independent columns, then an n × n matrix
A−1 can be constructed such that AA−1 = A−1 A = I, where I is the n × n identity.
For example,
! !
3 2 −1 −1/11 2/11
A= A =
7 1 7/11 −3/11
! !
a b −1 1 d −b
A= A = ,
c d ad − bc −c a
10