2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 행렬 (Matrices)

Slides:



Advertisements
Similar presentations
CSNB143 – Discrete Structure
Advertisements

Chapter Matrices Matrix Arithmetic
Applied Informatics Štefan BEREŽNÝ
Mathematics. Matrices and Determinants-1 Session.
MF-852 Financial Econometrics
Maths for Computer Graphics
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
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”)
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.
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
4.7 Identity and Inverse Matrices. What is an identity? In math the identity is the number you multiply by to have equivalent numbers. For multiplication.
Chapter 1: Matrices Definition 1: A matrix is a rectangular array of numbers arranged in horizontal rows and vertical columns. EXAMPLE:
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
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.
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.
CS 250, Discrete Structures, Fall 2011 Nitesh Saxena
Overview Definitions Basic matrix operations (+, -, x) Determinants and inverses.
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,
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.
Matrices Section 2.6. Section Summary Definition of a Matrix Matrix Arithmetic Transposes and Powers of Arithmetic Zero-One matrices.
이산수학 (Discrete Mathematics) 7.3 관계의 표현 (Representing Relations) 2006 년 봄학기 문양세 강원대학교 컴퓨터과학과.
Chapter 2 … part1 Matrices Linear Algebra S 1. Ch2_2 2.1 Addition, Scalar Multiplication, and Multiplication of Matrices Definition A matrix is a rectangular.
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.
Unit 3 Matrix Arithmetic IT Disicipline ITD 1111 Discrete Mathematics & Statistics STDTLP 1 Unit 3 Matrix Arithmetic.
Matrices and Determinants
MATRICES Operations with Matrices Properties of Matrix Operations
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.
CS 450: COMPUTER GRAPHICS TRANSFORMATIONS SPRING 2015 DR. MICHAEL J. REALE.
Section 2.4. Section Summary  Sequences. o Examples: Geometric Progression, Arithmetic Progression  Recurrence Relations o Example: Fibonacci Sequence.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
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
Linear Algebraic Equations and Matrices
Discrete Structures – CNS2300
1.5 Matricies.
Linear Algebraic Equations and Matrices
L6 matrix operations.
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
Sequences and Summations
2.2 Introduction to Matrices
CS100: Discrete structures
Matrix Algebra.
Discrete Mathematics and its Applications
Rosen 5th ed., §2.7 ~18 slides, ~1 lecture
Applied Discrete Mathematics Week 4: Functions
Presentation transcript:

2015 년 봄학기 강원대학교 컴퓨터과학전공 문양세 이산수학 (Discrete Mathematics) 행렬 (Matrices)

Discrete Mathematics by Yang-Sae Moon Page 2 Introduction A matrix (say MAY-trix) is a rectangular array of objects (usually numbers). ( 행렬은 수의 사각형 배열이다.) An m  n (“m by n”) matrix has exactly m horizontal rows, and n vertical columns. (m 개의 행과 n 개의 열을 갖는 행렬 ) Plural of matrix = matrices An n  n matrix is called a square matrix, whose order is n. ( 행과 열의 개수가 같은 행렬을 정방행렬이라 한다.) Tons of applications: Models within Computational Science & Engineering Computer Graphics, Image Processing, Network Modeling Many, many more … Matrices

Discrete Mathematics by Yang-Sae Moon Page 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. ( 두 행렬이 같은 수의 행과 열을 가지며 각 위치의 해당 원소의 값이 같으 면 “ 두 행렬은 같다 ” 고 정의한다.) Example Matrices

Discrete Mathematics by Yang-Sae Moon Page 4 Row and Column Order (1/2) The rows in a matrix are usually indexed 1 to m from top to bottom. The rows in a matrix are usually indexed 1 to m from top to bottom. ( 행은 위에서 아래로 1~m 의 색인 값을 갖는다.) The columns are usually indexed 1 to n from left to right. The columns are usually indexed 1 to n from left to right. ( 열은 왼쪽에서 오른쪽으로 1~n 의 색인 값을 갖는다.) Elements are indexed by row, then column. Elements are indexed by row, then column. ( 각 원소는 행 색인, 열 색인의 순으로 표현한다.) Matrices

Discrete Mathematics by Yang-Sae Moon Page 5 Row and Column Order (2/2) Let A be mn matrix Let A be m  n matrix [a i,j ], i th row = 1n matrix i th row = 1  n matrix [a i,1 a i,2 … a i,n ], j th column = m1 matrix j th column = m  1 matrix Matrices

Discrete Mathematics by Yang-Sae Moon Page 6 Matrix Sums mn mn The sum A+B of two m  n matrices A, B is the m  n matrix given by adding corresponding elements. (A+B 는 (i,j) 번째 원소로서 a i,j +b i,j 를 갖는 행렬이다.) A+B = C = [c i,j ] = [a i,j +b i,j ] where A = [a i,j ] and B = [b i,j ] Example Matrices

Discrete Mathematics by Yang-Sae Moon Page 7 Matrix Products (1/2) 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 i th row of A and the j th column of B (considered as vectors). (AB 의 원소 (i,j) 는 A 의 i 번째 열과 B 의 j 번째 행의 곱이다.) Matrices

Discrete Mathematics by Yang-Sae Moon Page 8 Matrix Products (2/2) Example Matrix multiplication is not commutative! ( 교환법칙 성립 안 함 ) A = m  n matrix, B = r  s matrix AB can be defined when n = r BA can be defined when s = m Both AB and BA can be defined when m = n = r = s Matrices

Discrete Mathematics by Yang-Sae Moon Page 9 Matrix Multiplication Algorithm procedure matmul(matrices A: m  k, B: k  n) for i := 1 to m for j := 1 to n begin c i,j := 0 for q := 1 to k c i,j := c i,j + a i,q b q,j end {C=[c i,j ] is the product of A and B} What’s the  of its time complexity?  (m)·  (n)· (  (1)+  (k) ·  (1) ) Answer:  (mnk) Matrices

Discrete Mathematics by Yang-Sae Moon Page 10 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. ((i,i) 번째 원소가 1 이고, 나머지는 모두 0 인 행렬 ) AI n = I n A = A Matrices

Discrete Mathematics by Yang-Sae Moon Page 11 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. ( 정방 행렬 A 에 대해서 하나의 유일한 역행렬 A -1 이 존재한다.) If the inverse exists, it is unique, and A -1 A = AA -1. A A -1 I3I3 Matrices

Discrete Mathematics by Yang-Sae Moon Page 12 Matrix Transposition ( 전치 행렬 ) If A=[a i,j ] 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 i,j ] = [a j,i ] (1  i  n,1  j  m) Flip across diagonal Matrices

Discrete Mathematics by Yang-Sae Moon Page 13 Symmetric Matrices ( 대칭 행렬 ) A square matrix A is symmetric iff A=A t. I.e.,  i,j  n: a ij = a ji. Which is symmetric? Matrices

Discrete Mathematics by Yang-Sae Moon Page 14 Powers of Matrices ( 멱행렬 ) If A is an n  n square matrix and p  0, then: A p  AAA···A (A 0  I n ) Example: p times Matrices

Discrete Mathematics by Yang-Sae Moon Page 15 Zero-One Matrices (0-1 행렬 ) Useful for representing other structures. E.g., relations, directed graphs (later in course) All elements of a zero-one matrix are 0 or 1 Representing False & True respectively. 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: A  B :  [a ij  b ij ] Matrices

Discrete Mathematics by Yang-Sae Moon Page 16 Boolean Products ( 부울 곱 ) (1/2) 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 multiplication, but using “  ” instead “+” using “  ” instead of “∙” A⊙BA⊙B Matrices

Discrete Mathematics by Yang-Sae Moon Page 17 Example: Algorithm of Boolean Product ⊙ procedure Boolean product(A,B: zero-one matrices) 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 Boolean product of A and B.} Boolean Products ( 부울 곱 ) (2/2) Matrices

Discrete Mathematics by Yang-Sae Moon Page 18 Boolean Powers ( 부울 거듭제곱 ) For a square zero-one matrix A, and any k  0, the k th Boolean power of A is simply the Boolean product of k copies of A. (A 의 k 부울린 거듭제곱 ) A [k]  A ⊙ A ⊙ … ⊙ A, A [0]  I n Example: k times ⊙ ⊙ ⊙ Matrices

Discrete Mathematics by Yang-Sae Moon Page 19 Homework #4 Matrices