0% found this document useful (0 votes)
16 views4 pages

Inverting Matrices: Determinants and Matrix Multiplication

The document discusses determinants and their use in inverting matrices. Determinants represent the total information in a matrix after removing redundancy between variables. They are used to find the inverse of a matrix, which when multiplied by the original matrix produces the identity matrix. Matrix multiplication and inverting 2x2 and 3x3 matrices are also explained.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views4 pages

Inverting Matrices: Determinants and Matrix Multiplication

The document discusses determinants and their use in inverting matrices. Determinants represent the total information in a matrix after removing redundancy between variables. They are used to find the inverse of a matrix, which when multiplied by the original matrix produces the identity matrix. Matrix multiplication and inverting 2x2 and 3x3 matrices are also explained.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Inverting Matrices: Determinants and Matrix Multiplication 

Determinants

Square matrices have determinants, which are useful in other matrix operations,
especially inversion.
a 11 a12
a 21 a22
¿
righ
¿
¿
¿

For a second-order square matrix, A, , the determinant of A,


[¿ ] ¿
¿
¿

|A|=a11∗a 22−a12∗a21

Consider the following bivariate raw data matrix:

Subject # 1 2 3 4 5
X 12 18 32 44 49
Y 1 3 2 4 5

from which the following XY variance-covariance matrix is obtained:

X Y
X 256 21.5
Y 21.5 2.5

COV XY 21 .5
r= = =0. 9
S X SY √256 √2 .5 |A|=256(2.5)−21.5(21.5)=177 .75
Think of the variance-covariance matrix as containing information about the two
variables – the more variable X and Y are, the more information you have. The total
amount of information you have is reduced, however, by any redundancy between X
and Y – that is, to the extent that you have covariance between X and Y you have less
total information. The determinant of a matrix is sometimes called its generalized
variance, the total amount of information you have about variance in the scores, after
removing the redundancy between the variables – look at how we just computed the
determinant – the product of the variances (information) less the product of the
covariances (redundancy).

Now think of the information in the X scores as being represented by the width of
a rectangle, and the information in the Y scores represented by the height of the
rectangle. The area of this rectangle is the total amount of information you have. Since

 Copyright 2011, Karl L. Wuensch - All rights reserved.

[Link]
2

I specified that the shape was rectangular (X and Y are perpendicular to one another),
the covariance is zero and the generalized variance is simply the product of the two
variances.

Now allow X and Y to be correlated with one another. Geometrically this is


reducing the angle between X and Y from 90 degrees to a lesser value. As you reduce
the angle the area of the parallelogram is reduced – the total information you have is
less than the product of the two variances. When X and Y become perfectly correlated
(the angle is reduced to zero) the determinant had been reduced to value zero.

Consider the following bivariate raw data matrix:

Subject # 1 2 3 4 5
X 10 20 30 40 50
Y 1 2 3 4 5

from which the following XY variance-covariance matrix is obtained:

X Y
X 250 25
Y 25 2.5

COV XY 25
r= = =1
S X SY √ 250 √ 2 .5 |A|=250(2.5)−25(25)=0
Inverting a Matrix

Determinants are useful in finding the inverse of a matrix, that is, the matrix that
when multiplied by A yields the identity matrix. That is, AA1 = A1A = I

An identity matrix has 1’s on its main diagonal, 0’s elsewhere. For example,
1 0 0
0 1 0
0 0 1
¿
righ
¿
¿
¿
[ ¿] [ ¿] ¿
¿
¿

With scalars, multiplication by the inverse yields the scalar identity, 1:


1 1 a
a∗ =1. a∗ = .
a Multiplying by an inverse is equivalent to division: b b
a 22 - a 12
− a 2 1 a1 1
¿
r i gh
¿
¿
¿
2 . 5 -2 1 . 5
- 21 . 5 25 6
¿
r i gh
¿
¿

The inverse of a 2 * 2 matrix,


¿
[ ¿ ] ¿
1 1
A −
2 = ∗¿ ¿
| A | 2
¿

for our example.


3

Multiplying a scalar by a matrix is easy - simply multiply each matrix element by the
scalar, thus,
. 014064698 - . 120956399
- . 120956399 1 . 440225035
¿
righ
¿
¿
¿
[ ¿ ] ¿
−1
A =¿ ¿
¿

Now to demonstrate that AA1 = A1A = I, but multiplying matrices is not so easy.
For a 2  2,
a b
c d
¿
r ig h
¿
¿
¿
w x
y z
¿
r ig h
¿
¿
¿
row 1∗c ol 1 row 1∗c ol 2
row 2∗c ol 1 row 2∗c ol 2
¿
r ig h
¿
¿
¿
aw + by a x + bz
c w + dy c x + dz
¿
r ig h
¿
¿
¿
[ ¿ ] ¿
¿
¿

256 21 . 5
21 . 5 2 . 5
¿
righ
¿
¿
¿
. 014064698 - . 120956399
−. 120956399 1 . 440225035
¿
righ
¿
¿
¿
1 0
0 1
¿
righ
¿
¿
¿
[ ¿ ] ¿
¿
¿

Third-Order Determinant and Matrix Multiplication

The determinant of a third-order square matrix,


a11 a12 a13
a21 a22 a23
a31 a32 a33
¿
righ
¿
¿
¿
[ ¿ ] [ ¿] ¿
¿
¿

=a11∗a22∗a 33+ a12∗a 23∗a 31+a 13∗a32∗a21−a 31∗a22∗a13−a11∗a32∗a 23−a12∗a21∗a33


Matrix multiplication for a 3 x 3
a b c
d e f
g h i
¿
rig h
¿
¿
¿
r s t
u v w
x y z
¿
rig h
¿
¿
¿
a r + b u + cx a s + b v + cy a t + b w + cz
d r + eu + fx ds + ev + fy d t + e w + fz
gr + hu + ix gs + h v + iy gt + h w + iz
¿
rig h
¿
¿
¿
[ ¿ ] [ ¿ ] ¿
¿
¿

That is,
row 1∗col 1 row 1∗col 2 row 1∗col 3
row 2∗col 1 row 2∗col 2 row 2∗col 3
row 3∗col 1 row 3∗col 2 row 3∗col 3
¿
righ
¿
¿
¿
[¿ ] [¿ ]¿
¿
¿

Isn’t this fun? Aren’t you glad that SAS will do matrix algebra for you? Copy the
little program below into the SAS editor and submit it.
4

SAS Program
Proc IML;
reset print;
XY ={
256 21.5,
21.5 2.5};
determinant = det(XY);
inverse = inv(XY);
identity = XY*inverse;
quit;

Look at the program statements. The “reset print” statement makes SAS display
each matrix as it is created. When defining a matrix, one puts brackets about the data
points and commas at the end of each row of the matrix.

Look at the output. The first matrix is the variance-covariance matrix from this
handout. Next is the determinant of that matrix, followed by the inverted variance-
covariance matrix. The last matrix is, within rounding error, an identity matrix, obtained
by multiplying the variance-covariance matrix by its inverse.

SAS Output
XY 2 rows 2 cols (numeric)
256 21.5
21.5 2.5

DETERMINANT 1 row 1 col (numeric)


177.75

INVERSE 2 rows 2 cols (numeric)


0.0140647 -0.120956
-0.120956 1.440225

IDENTITY 2 rows 2 cols (numeric)


1 -2.22E-16
-2.08E-17 1

Copyright 2011, Karl L. Wuensch - All rights reserved.

You might also like