math111_logo Vector and Matrix

2. Matrix

Let M(m, n) be the collection of all m by n matrices. The zero matrix is

O =[ 0 0 ... 0 ]
0 0 ... 0
: : :
0 0 ... 0

Like vectors, matrices of the same size may be added.

[ a11 a12 ... a1n ] + [ b11 b12 ... b1n ] = [ a11+b11 a12+b12 ... a1n+b1n ]
a21 a22 ... a2n b21 b22 ... b2n a21+b21 a22+b22 ... a2n+b2n
: : : : : : : : :
am1 am2 ... amn bm1 bm2 ... bmn am1+bm1 am2+bm2 ... amn+bmn

A number (scalar) can also be multiplied to matrices

c [ a11 a12 ... a1n ] =[ ca11 ca12 ... ca1n ]
a21 a22 ... a2n ca21 ca22 ... ca2n
: : : : : :
am1 am2 ... amn cam1 cam2 ... camn

Moreover, we may combine the two operations and form the linear combinations of matrices (of the same size).

Example Let

A = [ 1 1 -2 ], B = [ -1 0 1 ], C = [ 0 1 0 ], D = [ 0 1 ]
3 0 1 -2 1 1 1 0 0 1 2

Then

A + B = [ 1 + (-1) 1 + 0 (-2) + 1 ] = [ 0 1 -1 ]
3 + (-2) 0 + 1 1 + 1 1 1 2
A + B + C = [ 1 + (-1) + 0 1 + 0 + 1 (-2) + 1 + 0 ] = [ 0 2 -1 ]
3 + (-2) + 1 0 + 1 + 0 1 + 1 + 0 2 1 2
2A = [ 2×1 2×1 2×(-2) ] = [ 2 2 -4 ]
2×3 2×0 2×1 6 0 2
-3D = [ (-3)×0 (-3)×1 ] = [ 0 -3 ]
(-3)×1 (-3)×2 -3 -6
3A - 4B + 2C = [ 3 + 4 + 0 3 + 0 + 2 - 6 - 4 + 0 ] = [ 7 5 -10 ]
9 + 8 + 2 0 - 4 + 0 3 - 4 + 0 19 -4 -1

On the other hand, expressions such as A + D, B + D, A + D are meaningless.

Euclidean vectors can be considered as matrices of special sizes. Specifically, a vertical n-dimensional euclidean vector is an n by 1 matrix, and the euclidean space Rn is identified with M(n, 1). On the other hand, if we present vectors horizontally, then Rn is identified with M(1, n).

Although euclidean vectors may be presented either vertically or horizontally, you are strongly advised to use vertical vectors when they are mixed with matrices. For example, in expressing a system of linear equation as Ax = b, because of the presence of the matrix A, we should consider x and b as vertical vectors.

Conversely, matrices can be considered as an (ordered) collection of vectors. Specifically, an m by n matrix is equivalent to n euclidean column vectors of dimension m.

A = [a1 a2 ... an] ⇔ a1, a2, ..., anRn.

Similarly, we may also consider row vectors, so that an m by n matrix is equivalent to m euclidean row vectors of dimension n.

Example The matrix

A = [ 1 2 3 ]
4 5 6

can be considered as three 2-dimensional column vectors

A = [a1 a2 a3], a1 = [ 1 ], a2 = [ 2 ], a3 = [ 3 ]
4 5 6

It can also be considered as two 3-dimensional row vectors.

A = [ b1 ], b1 = (1, 2, 3), b2 = (4, 5, 6)
b2

The relations between the vectors and the matrices are compatible with addition and scalar multiplication. For example, for three column matrices A = [a1 a2 a3], B = [b1 b2 b3], we have

A + B = [a1 + b1 a2 + b2 a3 + b3], cA = [ca1 ca2 ca3].

Because of this compatibility, the properties for the addition and scalar multiplication of vectors are also hold for matrices.


[part 1] [part 2] [part 3] [next topic]