1 Matrices Rosen 6 th ed., §3.8 2 Matrices A matrix is a rectangular array of numbers.A matrix is a rectangular array of numbers. An m  n (“m by n”)

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
Matrices A matrix is a rectangular array of quantities (numbers, expressions or function), arranged in m rows and n columns x 3y.
Matrix Definition: An array of numbers in m rows and n colums is called an mxn matrix A square matrix of order n, is an (nxn) matrix.
Mathematics. Matrices and Determinants-1 Session.
MF-852 Financial Econometrics
Maths for Computer Graphics
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Matrices MSU CSE 260.
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
MATRICES. Matrices A matrix is a rectangular array of objects (usually numbers) arranged in m horizontal rows and n vertical columns. A matrix with m.
CE 311 K - Introduction to Computer Methods Daene C. McKinney
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
Compiled By Raj G. Tiwari
February 25, 2002Applied Discrete Mathematics Week 5: Mathematical Reasoning 1 Addition of Integers How do we (humans) add two integers? Example: 7583.
Sundermeyer MAR 550 Spring Laboratory in Oceanography: Data and Methods MAR550, Spring 2013 Miles A. Sundermeyer Linear Algebra & Calculus Review.
ECON 1150 Matrix Operations Special Matrices
Matrices Square is Good! Copyright © 2014 Curt Hill.
A rectangular array of numbers (we will concentrate on real numbers). A nxm matrix has ‘n’ rows and ‘m’ columns What is a matrix? First column First row.
2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 행렬 (Matrices)
CS 250, Discrete Structures, Fall 2011 Nitesh Saxena
Matrices. A matrix, A, is a rectangular collection of numbers. A matrix with “m” rows and “n” columns is said to have order m x n. Each entry, or element,
8.1 Matrices & Systems of Equations
Lecture 7 Matrices CSCI – 1900 Mathematics for Computer Science Fall 2014 Bill Pine.
Chapter 4 – Matrix CSNB 143 Discrete Mathematical Structures.
Based on Rosen, Discrete Mathematics & Its Applications, 5e Prepared by (c) Michael P. Frank Modified by (c) Haluk Bingöl 1/21 Module.
Matrices Matrices A matrix (say MAY-trix) is a rectan- gular array of objects (usually numbers). An m  n (“m by n”) matrix has exactly m horizontal.
2009/9 1 Matrices(§3.8)  A matrix is a rectangular array of objects (usually numbers).  An m  n (“m by n”) matrix has exactly m horizontal rows, and.
Module #9: Matrices Rosen 5 th ed., §2.7 Now we are moving on to matrices, section 7.
Discrete Mathematics 1 Kemal Akkaya DISCRETE MATHEMATICS Lecture 16 Dr. Kemal Akkaya Department of Computer Science.
Prepared by Deluar Jahan Moloy Lecturer Northern University Bangladesh
Notes 7.2 – Matrices I. Matrices A.) Def. – A rectangular array of numbers. An m x n matrix is a matrix consisting of m rows and n columns. The element.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Meeting 18 Matrix Operations. Matrix If A is an m x n matrix - that is, a matrix with m rows and n columns – then the scalar entry in the i th row and.
CSCI 171 Presentation 9 Matrix Theory. Matrix – Rectangular array –i th row, j th column, i,j element –Square matrix, diagonal –Diagonal matrix –Equality.
2 2.1 © 2012 Pearson Education, Inc. Matrix Algebra MATRIX OPERATIONS.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
CSNB143 – Discrete Structure Topic 3 – Matrices. Learning Outcomes Students should understand all matrices operations. Students should be able to differentiate.
Module #9 – Number Theory 1/5/ Algorithms, The Integers and Matrices.
Greatest Common Divisors & Least Common Multiples  Definition 4 Let a and b be integers, not both zero. The largest integer d such that d|a and d|b is.
Matrices and Determinants
MATRICES Operations with Matrices Properties of Matrix Operations
Af2. The Queen Mother says “ Please be quite and let Patrick give the lecture. Thank you.”
Matrices and Matrix Operations. Matrices An m×n matrix A is a rectangular array of mn real numbers arranged in m horizontal rows and n vertical columns.
MATRIX A set of numbers arranged in rows and columns enclosed in round or square brackets is called a matrix. The order of a matrix gives the number of.
Section 2.4. Section Summary  Sequences. o Examples: Geometric Progression, Arithmetic Progression  Recurrence Relations o Example: Fibonacci Sequence.
MATRICES. Introduction Matrix algebra has several uses in economics as well as other fields of study. One important application of Matrices is that it.
Module #9 – Number Theory 6/11/20161 Chapter 3 Algorithms, Integers and Matrices.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
CS 285- Discrete Mathematics Lecture 11. Section 3.8 Matrices Introduction Matrix Arithmetic Transposes and Power of Matrices Zero – One Matrices Boolean.
Introduction Types of Matrices Operations
A very brief introduction to Matrix (Section 2.7) Definitions Some properties Basic matrix operations Zero-One (Boolean) matrices.
MATRICES A rectangular arrangement of elements is called matrix. Types of matrices: Null matrix: A matrix whose all elements are zero is called a null.
Matrices. Matrix A matrix is an ordered rectangular array of numbers. The entry in the i th row and j th column is denoted by a ij. Ex. 4 Columns 3 Rows.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
CSE 504 Discrete Mathematics & Foundations of Computer Science
Discrete Structures – CNS2300
1.5 Matricies.
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
Sequences and Summations
MATRICES MATRIX OPERATIONS.
MATRICES MATRIX OPERATIONS.
2.2 Introduction to Matrices
[MATRICES ].
Discrete Mathematics and its Applications
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
MATRICES MATRIX OPERATIONS.
[MATRICES ].
Applied Discrete Mathematics Week 4: Functions
Presentation transcript:

1 Matrices Rosen 6 th ed., §3.8

2 Matrices A matrix is a rectangular array of numbers.A matrix is a rectangular array of numbers. An m  n (“m by n”) matrix has exactly m horizontal rows, and n vertical columns.An m  n (“m by n”) matrix has exactly m horizontal rows, and n vertical columns. An n  n matrix is called a square matrix, whose order is n.An n  n matrix is called a square matrix, whose order is n. a 3  2 matrix

3 Matrix Equality Two matrices A and B are equal iff they have the same number of rows, the same number of columns, and all corresponding elements are equal.Two matrices A and B are equal iff they have the same number of rows, the same number of columns, and all corresponding elements are equal.

4 Row and Column Order The rows in a matrix are usually indexed 1 to m from top to bottom. The columns are usually indexed 1 to n from left to right. Elements are indexed by row, then column.The rows in a matrix are usually indexed 1 to m from top to bottom. The columns are usually indexed 1 to n from left to right. Elements are indexed by row, then column.

5 Matrix Sums The sum A+B of two matrices A, B (which must have the same number of rows, and the same number of columns) is the matrix (also with the same shape) given by adding corresponding elements.The sum A+B of two matrices A, B (which must have the same number of rows, and the same number of columns) is the matrix (also with the same shape) given by adding corresponding elements. A+B = [a i,j +b i,j ]A+B = [a i,j +b i,j ]

6 Matrix Products For an m  k matrix A and a k  n matrix B, the product AB is the m  n matrix:For an m  k matrix A and a k  n matrix B, the product AB is the m  n matrix: i.e., element (i,j) of AB is given by the vector dot product of the ith row of A and the jth column of B (considered as vectors).i.e., element (i,j) of AB is given by the vector dot product of the ith row of A and the jth column of B (considered as vectors). Note: Matrix multiplication is not commutative!Note: Matrix multiplication is not commutative!

7 Matrix Product Example An example matrix multiplication to practice in class:An example matrix multiplication to practice in class:

8 Identity Matrices The identity matrix of order n, I n, is the order-n matrix with 1’s along the upper-left to lower-right diagonal and 0’s everywhere else.The identity matrix of order n, I n, is the order-n matrix with 1’s along the upper-left to lower-right diagonal and 0’s everywhere else.

9 Matrix Inverses For some (but not all) square matrices A, there exists a unique multiplicative inverse A -1 of A, a matrix such that A -1 A = I n.For some (but not all) square matrices A, there exists a unique multiplicative inverse A -1 of A, a matrix such that A -1 A = I n. If the inverse exists, it is unique, and A -1 A = AA -1.If the inverse exists, it is unique, and A -1 A = AA -1. We won’t go into the algorithms for matrix inversion...We won’t go into the algorithms for matrix inversion...

10 Matrix Multiplication Algorithm procedure matmul(matrices A: m  k, B: k  n) for i := 1 to m for j := 1 to n begin c ij := 0 for q := 1 to k c ij := c ij + a iq b qj end {C=[c ij ] is the product of A and B} What’s the  of its time complexity?  (m)·  (n)·(  (1)+  (k) ·  (1)) Answer:  (mnk)

11 Powers of Matrices If A is an n  n square matrix and p  0, then: A p  AAA···A (A 0  I n )A p  AAA···A (A 0  I n ) Example:Example: p times

12 If A=[a ij ] is an m  n matrix, the transpose of A (often written A t or A T ) is the n  m matrix given by A t = B = [b ij ] = [a ji ] (1  i  n,1  j  m)If A=[a ij ] is an m  n matrix, the transpose of A (often written A t or A T ) is the n  m matrix given by A t = B = [b ij ] = [a ji ] (1  i  n,1  j  m) Matrix Transposition Flip across diagonal

13 Symmetric Matrices A square matrix A is symmetric iff A=A t. I.e.,  i,j  n: a ij = a ji.A square matrix A is symmetric iff A=A t. I.e.,  i,j  n: a ij = a ji. Which is symmetric?Which is symmetric?

14 Zero-One Matrices All elements of a zero-one matrix are 0 or 1All elements of a zero-one matrix are 0 or 1 –Representing False & True respectively. Useful for representing other structures.Useful for representing other structures. –E.g., relations, directed graphs The meet of A, B (both m  n zero-one matrices):The meet of A, B (both m  n zero-one matrices): –A  B :  [a ij  b ij ] = [a ij b ij ] The join of A, B:The join of A, B: –A  B :  [a ij  b ij ]

15 Boolean Products Let A=[a ij ] be an m  k zero-one matrix, & let B=[b ij ] be a k  n zero-one matrix,Let A=[a ij ] be an m  k zero-one matrix, & let B=[b ij ] be a k  n zero-one matrix, The boolean product of A and B is like normal matrix , but using  instead + in the row-column “vector dot product.”The boolean product of A and B is like normal matrix , but using  instead + in the row-column “vector dot product.” A⊙BA⊙B

16 Arithmetic/Boolean Products A⊙BA⊙B

17 Boolean Powers For a square zero-one matrix A, and any k  0, the kth Boolean power of A is simply the Boolean product of k copies of A.For a square zero-one matrix A, and any k  0, the kth Boolean power of A is simply the Boolean product of k copies of A. A [k]  A ⊙ A ⊙ … ⊙ AA [k]  A ⊙ A ⊙ … ⊙ A k times