Docsity

Matrix Algebra - Basic Statistics for Behavioral Sciences - Lecture Notes, Study notes of Statistics for Psychologists

Toggle sidebar
bg1
Ch. 2: Matrix Algebra
I. Introduction
A. Matrix: A set of (real or complex) numbers or variables
arranged in a rectangular array (rows and columns).
e.g.
=654
321
32X
A
=43
21
2
2X
B
* A square matrix is a special case of a rectangular matrix.
B. Vector: a one-dimension matrix (a vector is a special case
of a matrix).
Column vector:
=
4
3
2
1
14 X
a
Row vector:
[ ]
4321
41
'=
X
a
C. Equality of matrices: Two matrices are equal if the
dimension and the elements in corresponding positions are
equal (p.7).
D. Transpose and symmetric matrices
1. Transpose: interchanging the rows and columns of a
matrix.
e.g
=654
321
32X
A
=
63
52
41
'
23X
A
2. Symmetric matrix: the transpose of a matrix is
identical to the original matrix (square matrix).
e.g.
=
963
64
2
321
33X
A
=
963
642
321
'
33X
A
E. Special matrices
1. Diagonal matrix: a square matrix with numbers and
variables on the diagonal and zeros on the off-
diagonal.
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff

Partial preview of the text

Download Matrix Algebra - Basic Statistics for Behavioral Sciences - Lecture Notes and more Study notes Statistics for Psychologists in PDF only on Docsity!

Ch. 2: Matrix Algebra I. Introduction A. Matrix: A set of (real or complex) numbers or variables arranged in a rectangular array (rows and columns). e.g.

 

2 X 3

A 

2 X 2

B
  • A square matrix is a special case of a rectangular matrix.

B. Vector: a one-dimension matrix (a vector is a special case of a matrix).

Column vector: 

4 X 1

a Row vector: [ 1 2 3 4 ]

1 4

X a

C. Equality of matrices: Two matrices are equal if the dimension and the elements in corresponding positions are equal (p.7). D. Transpose and symmetric matrices

  1. Transpose: interchanging the rows and columns of a matrix. e.g

2 X 3

A

3 X 2

A
  1. Symmetric matrix: the transpose of a matrix is identical to the original matrix (square matrix). e.g.

3 X 3

A

3 X 3

A

E. Special matrices

  1. Diagonal matrix: a square matrix with numbers and variables on the diagonal and zeros on the off- diagonal.

3 X 3

D
  • A diagonal matrix can be made by taking the diagonals of a square matrix and replacing the off-diagonals with zeros. e.g.

3 X 3

A ( )

3 3 D Diag A X

  1. Identity matrix: a diagonal matrix with ones (1s).

3 X 3

I
  1. Upper and lower triangular matrix a) Upper triangular matrix: a square matrix with zeros below the diagonal. b) Lower triangular matrix: a square matrix with zeros above the diagonal.

3 X 3

U

3 X 3

L
  1. Unit matrix: a square matrix with 1s.

3 X 3

J
  1. Null matrix: a matrix with zeros.

3 X 3

O

II. Matrix operations Given:

 

2 X 2

A 

2 X 2

B 

2 X 2

C

A. Addition (elementwise): two matrices must have the same dimension.

h) Example

A = B = C =

AB =
ABC = (AB)C
  1. Sum of product: ( a’b ) a) Given a and b are vectors of nX1,

a = b = a = b =

Then, a’b is called sum of product and is a scalar.

e.g.,

a’b =

= ΣXY

b) ab’ is a matrix, either rectangular or square.

ab’ =

  1. Sum of squares: (a’a) a’a is sum of squares and is a scalar and aa’ is a square (symmetric) matrix.

a’a =

aa’ =

  1. Length of vector a = a ' a
  2. Since a’b is a scalar, it is equal to its transpose.

a’b = (a’b)’ = b’a

Then, (a’b)^2 = (a’b)(a’b) = (a’b)(a’b)’

= (a’b)(b’a) = a’(bb’)a

DA =
AD =

c) DAD =

d) If D = I , then IA = AI = A

E. Matrix partitioning

  1. Matrix A can be partitioned into submatrices

A =

A =
  1. Assuming conformability, the partitioned matrices or vectors can be multiplied as usual. Example

Ab =

A = b =

Then, Ab =

  1. If a matrix is nXp (n<p) and the rank of the matrix is n, then the matrix is to be said a full rank matrix. If not, the matrix is called less than full rank.
  2. If a square matrix (nXn) is a full rank matrix, then the matrix is called a nonsingular matrix. If it is not, then the matrix is called a singular matrix. G. Inverse
  3. If a matrix A is square and full rank, it is called nonsingular.
  4. Only a nonsingular matrix has its inverse (A-1) such that, AA -1^ = A-1A = I e.g.

A = A -1^ =

AA -1^ =
  1. If A is square and less than full rank, then it is called singular and has no inverse form.
  2. Computation of an inverse ( A is nonsingular). a) A =
AA -1^ = I =

b) Short-cut for a 2X2 matrix (nonsingular).

A = (^)  

21 22

11 12 a a

a a

  1. Exchange a 11 and a 22.
  2. Change the sign of a 12 and a 21.
  3. Compute a 11 a 22 – a 12 a 21 (Determinant of A ).
  4. Divide each element by Det( A ).
  5. Example,

H. Determinant

  1. A scalar of a square matrix (nXn), which describes some characteristics of matrix A , | A |.
  2. | A | = a 11 if n = 1, n | A | = Σ a 1j| A 1j|(-1)1+j^ if n>1. j=
  3. Example
  4. If matrix A is singular, then | A | = 0, and A has no
  • Columns are mutually independent.

In order to normalize each column, divided the elements in each column by its length, 3 , 6 , 2.

∴ C =

Columns are mutually independent and normalized.

  1. Rotation of axes a) We can transform x to z using the orthogonal matrix C. If z = Cx , then z’z = ( Cx )’( Cx ) = x’C’Cx = x’Ix = x’x. b) The distance among elements in z is the same as the distance among elements in x. K. Eigenvalue and eigenvector.
  2. For every square matrix A , a scalar λ and a non-zero vector x , there exists the following relationship, Ax = λ x.
  3. Then, λ is called eigenvalue and x is called eigenvector.
  4. Eigenvalue a) To find λ and x , we start with an equation, ( A – λ I ) x = 0. b) If x is non-zero (eigenvector is not zero), the only solution for this equation is that ( A – λ I ) is singular and thus, | A – λ I | = 0 (determinantal or characteristic equation). c) Solving the equation for λ will give us eigenvalues. d) Example,

A =

| A – λ I | = 0

  1. Eigenvector a) From Ax = λ x

We can set x 1 as a normalized vector.

x 1 =

With the same method and some computation

x 2 =

  1. tr( A ) and | A | For any square matrix A with eigenvalues λ 1 , λ 2 ,... λn, tr( A ) = Σλi, and | A | = Πλi. Example,
D =

λ n

2

1

c) A symmetric matrix A can be diagonalized into a CDC’ expression, called spectral decomposition, with orthogonal matrices ( C and C ’) and a diagonal matrix ( D ). d) The diagonal matrix D contains eigenvalues of A. e) The orthogonal matrix C contains normalized eigenvectors of A. N. Square root matrix

  1. A positive definite matrix A can also be decomposed into A 1/2 A 1/2, where A 1/2^ is a square root matrix of A. A = A1/2A1/2 , and A1/2^ = CD1/2C’ , where
D1/2^ =

λ n

2

1

  1. With a similar manner we can say, A^2 = CD^2 C’, and A-1^ = CD-1C’ where
D^2 =

2

2 2

2 1

λ n

λ

λ

, and D-1^ =

−

−

−

1

1 2

1 1

λ n