Sunteți pe pagina 1din 22

# Matrices

As @ CC
1
What is a Matrix?
• A matrix is an ordered set of numbers listed
in rectangular form.
• Example.
2 5 7 8
5 6 8 9
3 9 0 1

As @ CC
2
Example
• A denote the matrix
2 5 7 8
A= 5 6 8 9
3 9 0 1
• This matrix A has three rows and four
columns. We say it is a 3 x 4 matrix.
• We denote the element on the second row
and fourth column with a2,4.

As @ CC
3
In general,
• If a matrix has n rows and m columns, we
call it an n x m matrix
• We denote the element on the ith row and
jth column with ai,j.

As @ CC
4
Square matrix
• If a matrix A has n rows and n columns then
we say, it is a square matrix.
• In a square matrix the elements ai,i ,
with i = 1,2,3,... , are called diagonal lements.

## • Remark. There is no difference between a 1

x 1 matrix and an ordenary number.

As @ CC
5
Diagonal matrix
• A diagonal matrix is a square matrix with
all the non-diagonal elements are 0.
• The diagonal matrix is completely denoted
by the diagonal elements.
• Example.
7 0 0
0 5 0
0 0 6

## • The matrix is denoted by diag(7 , 5 , 6)

As @ CC
6
Row matrix
• A matrix with one row is called a row matrix
• Eg. : 1 5 12

Column matrix
• A matrix with one column is called a column
matrix
• Eg. : 1
5
12
As @ CC
7
Identity matrix
• An identity matrix I is a diagonal matrix
with all diagonal element = 1.
• Eg.: 1 0 0 0
0 1 0 0
0 0 1 0
0 0 0 1

As @ CC
8
Tranpose of a matrix
• The n x m matrix A' is the transpose of the m x n matrix
A if and only if
– The ith row of A = the ith column of A' for (i = 1,2,3,..n)
– So ai,j = aj,i‘

Example :
Let
1 2 3
4 5 6
Then
1 4
Transpose ( A ) = 2 5
3 6

As @ CC
9
• Matrix addition and subtraction occurs by
adding (subtracting) the like elements of
same dimension matrices.
• Example
1 2 5 6  6 8 
3 4 + 7 8 = 10 12
     

As @ CC
10
Matrix Multiplication
• Matrix multiplication can only occur
between matrices where the number of
columns of the first matrix to be multiplied
equals the number of rows of the second
matrix being multiplied.
• Matrix multiplication is best shown by an
example.

As @ CC
11
Example
 6 8 3 − 8 1 90 − 32 46
− 2 4 * 9 2 5 = 30 24 18 
     

• Expanded:

##  6*3 + 8*9 6 * (−8) + 8 * 2 6 *1 + 8 * 5 

 − 2 * 3 + 4 * 9 − 2 * (−8) + 4 * 2 − 2 * 1 + 4 * 5
 

As @ CC
12
Inverse of a matrix
• For a square matrix A, the inverse is written A-1.
• When A is multiplied by A-1 the result is the
identity matrix I.( ie A. A-1 = I )
• Non-square matrices do not have inverses.
• Not all square matrices have inverses.
• A square matrix which has an inverse is called
invertible or nonsingular.
• A square matrix without an inverse is called
noninvertible or singular.
As @ CC
13
Example

As @ CC
14
Example

As @ CC
15
As @ CC
16
As @ CC
17
Basic Laws………………
• A+(B+C) = (A+B)+C Additive associative
law
commutative law
• A+O = O+A = A Additive identity law
• A+( - A) = O = ( - A)+A Additive inverse law
• c(A+B) = cA+cB Distributive law
• (c+d)A = cA+dA Distributive law
• A=A Scalar unit
• 0A = O Scalar zero
As @ CC
18
Basic Laws………………
• A(BC) = (AB)C Multiplicative associative law
• AI = IA = A Multiplicative identity law
• A(B+C) = AB + AC Distributive law
• (A+B)C = AC + BC Distributive law
• OA = AO = O Multiplication by zero matrix
• (A+B)T = AT + BT Transpose of a sum
• (cA)T = c(AT) Transpose of a scalar multiple
• (AB)T = BTAT Transpose of a matrix product
• AA-1=A-1A=I

As @ CC
19
Matrix Commands in Calc
Transpose TRANSPOSE
Matrix multiplication MMULT
Matrix inverse (MINVERSE)
Determinant of matrix (MDETERM)
.

As @ CC
20
Exercise:
• Find x & y when
2x + 3y = 23
x + 5y = 29

Solution :
2 3 X 23
1 5 Y 29

A X = B

X= A-1 B

As @ CC
21
Example
• To add the two matrices
=B3:C4+E3:F4 Ctrl+Shift+Enter
• To multiply the two matrices
=mmult(B3:C4;E3:F4 ) Ctrl+Shift+Enter

• =transpose(B3:C4)
• =minverse(B3:C4)
• =mdeterm(B3:C4)

As @ CC
22