the goal is to give an introduction to the mathematical operations with matrices. a matrix is a...

18
A PRATICAL INTRODUCTION TO MATRICES is to give an introduction to the mathematical operations with matr is a 2-dimensional arrangement of (real valued) data. The data entr d in rows and columns, just like in a spreadsheet or a table with da ormation can be found on Wikipedia. /en.wikipedia.org/wiki/Matrix_% 28mathematics%29 ) This brief introduction is by far not complete, It is NOT a formal mathematical introduction to Linear Algebra !

Upload: candice-mitchell

Post on 13-Dec-2015

218 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

A PRATICAL INTRODUCTION TO MATRICES

The goal is to give an introduction to the mathematical operations with matrices.A matrix is a 2-dimensional arrangement of (real valued) data. The data entries areorganized in rows and columns, just like in a spreadsheet or a table with data.

More information can be found on Wikipedia.

( http://en.wikipedia.org/wiki/Matrix_%28mathematics%29 )

This brief introduction is by far not complete, It is NOT a formal

mathematical introduction to Linear Algebra !

Page 2: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

A matrix with two rows and four columns

A PRATICAL INTRODUCTION TO MATRICES

1 2 3 4

5 6 7 8

A matrix with two rows and three columns

1 2 3

5 6 7

A matrix with two rows and two columns

1 2

5 6

Page 3: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

A matrix with two rows and four columns

A PRATICAL INTRODUCTION TO MATRICES

1 2 3 4

5 6 7 8

A matrix with two rows and two columns

1 5

2 6

3 7

4 8

Page 4: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

The size of this matrix is 2 rows by 3 columns

(we say ‘2 by 3’ and write ‘2 x 3’)

x1,1 x1,2 x1,3

x1,2 x2,2 x2,3

row 1

row 2

column 1column 2column 3

A PRATICAL INTRODUCTION TO MATRICES

Page 5: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

The size of this matrix is 2 rows by 3 columns

(we say ‘2 by 3’ and write ‘2 x 3’)

x1,1 x1,2 x1,3

x1,2 x2,2 x2,3

We use two indicesto identify an entryin the matrix:a row and column index

row 1

column 3

Entry in row 1, column 3:

x1,3 [X] 1,3 (X) 1,3

Matrix symbols:Capital letters ‘X’

or underlined Capital letters ‘X’

1 2 3 4

5 6 7 8

X entry (X) 2,3= 7

A PRATICAL INTRODUCTION TO MATRICES

Page 6: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

The size of this matrix is 2 rows by 3 columns

(we say ‘2 by 3’ and write ‘2 x 3’)

x1,1 x1,2 x1,3

x1,2 x2,2 x2,3

We use two indicesto identify an entryin the matrix:a row and column index

‘(‘ and ‘)’ are used to embrace the entries,when writing matrix arrays

or ‘[‘ and ‘]’ or ‘|’ ‘|’

Matrix symbols:Capital letters ‘X’

or underlined Capital letters ‘X’

( )

A PRATICAL INTRODUCTION TO MATRICES

Page 7: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

A square matrix of size n by n

with n=3

A rectangular matrix of size m by n

with m=3 and n=6 (m<n)

A rectangular matrix of size m by n

with m=4 and n=3 (m>n)

A PRATICAL INTRODUCTION TO MATRICES

Page 8: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

1 2 3 4

5 6 7 8

BASIC MATRIX OPERATIONS

Multiplication with a scalar:

22 4 6 8

10 12 14 16=

c X = Z

Size: m x n m x n

(Z) i,j = c(x) i,j

(For all i and j)

Page 9: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

1 2 3 4

5 6 7 8

BASIC MATRIX OPERATIONS

0 1 0 0

0 0 -1 1+

X + Y = Z Size: m x n m x n m x n

(Z) i,j = (X) i,j +(Y) i,j

(For all i and j)

Addition of Matrices:

1 3 3 4

5 6 6 9=

Page 10: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

1 2 3 4

5 6 7 8

BASIC MATRIX OPERATIONS

XT = YSize: m x n n x m

(X) i,j = (Y) j,i

(For all i and j)

Transpose of a Matrix 1 5

2 6

3 7

4 8

=

T

Page 11: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

Size: m x n n x k m x k

NOTE: Matrix multiplication is only defined for two matrices when the left matrix A has the same number of columns as the right matrix B has rows! The resulting matrix has the same number of rows as the left matrix A and the same number of columns asthe right matrix B.

Page 12: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

1 0 1

0 1 1

1 5

2 6

3 7

4 8

Size: 4 x 2 2 x 3 4 x 3

=

?

Page 13: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

1 0 1

0 1 1

1 5

2 6

3 7

4 8

Size: 4 x 2 2 x 3 4 x 3

=

1*1+0*5

Column 1

Row 1Vector

dot product

Page 14: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

1 0 1

0 1 1

1 5

2 6

3 7

4 8

Size: 4 x 2 2 x 3 4 x 3

=

1*1+0*5

3*0+7*1

Column 2

Row 3

Page 15: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

1 0 1

0 1 1

1 5

2 6

3 7

4 8

Size: 4 x 2 2 x 3 4 x 3

=

1*1+0*5

1*1+5*1

3*0+7*1

Column 3

Row 1

Page 16: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = C

1 0 1

0 1 1

1 5

2 6

3 7

4 8

Size: 4 x 2 2 x 3 4 x 3

=

1 5 6

2 6 8

3 7 10

4 8 12

Page 17: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

BASIC MATRIX OPERATIONS

Matrix Multiplication:

A B = CSize: m x n n x k m x k

ci,j =

Note: A B is not equal B A !

Rule to remember:

We pick from the left matrix a row vector (row i) and from the rightmatrix a column vector (column j), calculate the dot product between the two vectors and enter the result in the new matrix in row i, column j.

Page 18: The goal is to give an introduction to the mathematical operations with matrices. A matrix is a 2-dimensional arrangement of (real valued) data. The data

FINAL NOTE:

Errors can easily sneak into the slides. If you find a mistake, please contact

me

[email protected]

Thanks!

See also a 5 minute introduction:

http://ed.ted.com/lessons/how-to-organize-add-and-multiply-matrices-bill-shillito