Tuesday, December 27, 2011

Linear Algebra: Matrix Operations

In a blog last year, we looked closely at matrix operations:

http://brane-space.blogspot.com/2010/05/looking-at-matrix-groups.html

In particular, we saw the simple operation of matrix multiplication such that, given a matrix A:

(a11 a12)
(a21 a22)

and a matrix B:

(b11 b12)
(b21 b22)

then A X B =

(a11 a12) (b11 b12)
(a21 a22) (b21 b22)

= [{(a11b11) + (a12b21)} --{(a11 b12)+ (a12 b22)} ]
[(a21b11) + (a22b21) } --{((a21 b12) + (a22 b22)}]

For example, let A=

(1 2)
(1 2)

and B =

(1 3)
(2 2)

then A x B=

(5 7)
(5 7)

Readers should be able to work this out using the format shown. We now want to extend this to further operations with matrices, and we will confine attention to 2 x 2 matrices as subset of R^2.

1) Not all matrices multiply commutatively.

For example, with regular numbers it is a given that (2 x 3) = (3 X 2) = 6

Thus, in symbolic form: a x b = b x a

and we say the multiplication is commutative. But this need not be so with matrices and matrix multiplication.

For example, let: A =

(1 2)
(3 -1)

and B =

(2 0)
(1 1)

We find: A X B =

(4 2)
(5 -1)

But: B X A =

(2 4)
(4 1)

so that: A B NOT = BA and matrix multiplication doesn't give the same result both ways.

Another application is to obtain the transpose of a matrix and repeat such multiplication. The transpose of a matrix M, call it t^M, is obtained by the following procedure:

Let M =

(m11......m12)
(m21.....m22)

Then t^M is obtained by switching the elements such that for the transposed matrix:

m11 = m11,

m12 = m21

m21 = m12

and : m22 = m22

Exercis (1): Let A =

(2...1)
(3...1)

Find: t^A:

Using the procedure shown above for the elements, we have t^A =

(2.....3)
(1.....1)


Lastly, we come to the trace of a matrix. This is simply the addition of its diagonal elements. Thus, for any matrix M such as dentoed above:

Tr(M) = m11 + m22

The beauty of this is that it can easily be extended for any dimension matrix, say 3 x 3, or 4 x 4 or whatever. You simply add the diagonal elements:

Exercise (2): Find the trace of M1 =

(-1.....0.......0)
(0.......-1.....0)
(0.......0.......1)

We easily see the diagonal elements and thence add them:

Tr(M1) = (-1) + (-1) + 1 = -2 + 1 = -1

Problems:

1) Recall t^A, found in Ex. 1 and let B =

(-1...1)
(1....0)

a) Find AB and thence: t^(AB)

b) Verify that: t^AB = t^B t^A

2) Find the trace of: R3(Θ) =

(cos(Θ)..........sin(Θ)..........0)
(-sin (Θ)......cos(Θ)...........0)
(0 ..................0..................1)


3) Let A =

(cos Θ .....cos φ)
(cos φ .....sin Θ)

And let B = t^A

Find: AB

4) Find the traces of the following 3 x 3 matrices:

a) M1 =

(-i.....0.......0)
(0.......-7.....0)
(0.......0.......4)

b) M2 =

(3.....-2.......4)
(1.......-4.....1)
(-7.......-3......-3i )

c) A =

(1.....-1......1)
(2.......4.....1)
(3.......0.......1)

d) B =

(3.....1.......2)
(1.......1.....0)
(-1.......2.......1)

5) For the last two parts (c and d) of (4), show:

tr(AB) = tr(BA)

No comments: