Mathematics 13: Lecture 10

Similar documents
Matrix Multiplication

Kevin James. MTHSC 3110 Section 2.1 Matrix Operations

ICS 6N Computational Linear Algebra Matrix Algebra

Matrices: 2.1 Operations with Matrices

Section 9.2: Matrices.. a m1 a m2 a mn

CS100: DISCRETE STRUCTURES. Lecture 3 Matrices Ch 3 Pages:

Lecture 3 Linear Algebra Background

Matrices. Math 240 Calculus III. Wednesday, July 10, Summer 2013, Session II. Matrices. Math 240. Definitions and Notation.

Matrix Arithmetic. a 11 a. A + B = + a m1 a mn. + b. a 11 + b 11 a 1n + b 1n = a m1. b m1 b mn. and scalar multiplication for matrices via.

Review of Linear Algebra

Multiplying matrices by diagonal matrices is faster than usual matrix multiplication.

Mathematics 13: Lecture 4

Math 4377/6308 Advanced Linear Algebra

10. Linear Systems of ODEs, Matrix multiplication, superposition principle (parts of sections )

Lecture 3: Matrix and Matrix Operations

Section 1.6. M N = [a ij b ij ], (1.6.2)

Elementary maths for GMT

. a m1 a mn. a 1 a 2 a = a n

MATRICES. a m,1 a m,n A =

I = i 0,

7.5 Operations with Matrices. Copyright Cengage Learning. All rights reserved.

Introduction. Vectors and Matrices. Vectors [1] Vectors [2]

Numerical Analysis Lecture Notes

Matrices BUSINESS MATHEMATICS

Phys 201. Matrices and Determinants

Section 9.2: Matrices. Definition: A matrix A consists of a rectangular array of numbers, or elements, arranged in m rows and n columns.

Matrices. Chapter Definitions and Notations

Matrix Algebra 2.1 MATRIX OPERATIONS Pearson Education, Inc.

Linear Equations in Linear Algebra

Prepared by: M. S. KumarSwamy, TGT(Maths) Page

Matrix Algebra. Matrix Algebra. Chapter 8 - S&B

Linear Algebra (Review) Volker Tresp 2018

Chapter 1: Systems of linear equations and matrices. Section 1.1: Introduction to systems of linear equations

CS 246 Review of Linear Algebra 01/17/19

INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATRICES

A FIRST COURSE IN LINEAR ALGEBRA. An Open Text by Ken Kuttler. Matrix Arithmetic

Matrices and Vectors

Matrix Basic Concepts

Mathematics 22: Lecture 10

CLASS 12 ALGEBRA OF MATRICES

Announcements Wednesday, October 10

Announcements Monday, October 02

Countable and uncountable sets. Matrices.

Stage-structured Populations

Linear Algebra I Lecture 8

Linear Algebra and Matrix Inversion

ICS141: Discrete Mathematics for Computer Science I

. =. a i1 x 1 + a i2 x 2 + a in x n = b i. a 11 a 12 a 1n a 21 a 22 a 1n. i1 a i2 a in

Matrix Arithmetic. j=1

What is the Matrix? Linear control of finite-dimensional spaces. November 28, 2010

Finite Mathematics Chapter 2. where a, b, c, d, h, and k are real numbers and neither a and b nor c and d are both zero.

Linear Algebra (Review) Volker Tresp 2017

A primer on matrices

Matrix Algebra: Definitions and Basic Operations

Linear Algebra V = T = ( 4 3 ).

Chapter 4 - MATRIX ALGEBRA. ... a 2j... a 2n. a i1 a i2... a ij... a in

Calculus II - Basic Matrix Operations

MATRICES AND MATRIX OPERATIONS

Elementary Row Operations on Matrices

1 Matrices and matrix algebra

Matrices, vectors and scalars. Operations. Matrix multiplication. notes linear algebra 1. Consider the following examples. a 11 a 12 a 21 a 22

Matrix Algebra & Elementary Matrices

Lecture 8: Determinants I

Raphael Mrode. Training in quantitative genetics and genomics 30 May 10 June 2016 ILRI, Nairobi. Partner Logo. Partner Logo

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

MAC Module 2 Systems of Linear Equations and Matrices II. Learning Objectives. Upon completing this module, you should be able to :

Math 360 Linear Algebra Fall Class Notes. a a a a a a. a a a

Matrix operations Linear Algebra with Computer Science Application

Review of linear algebra

Basic Concepts in Linear Algebra

Linear Algebra review Powers of a diagonalizable matrix Spectral decomposition

Matrices and systems of linear equations

Matrix representation of a linear map

Materials engineering Collage \\ Ceramic & construction materials department Numerical Analysis \\Third stage by \\ Dalya Hekmat

Matrix representation of a linear map

Topic 1: Matrix diagonalization

Review of Basic Concepts in Linear Algebra

Matrix Operations. Linear Combination Vector Algebra Angle Between Vectors Projections and Reflections Equality of matrices, Augmented Matrix

Definition 2.3. We define addition and multiplication of matrices as follows.

n n matrices The system of m linear equations in n variables x 1, x 2,..., x n can be written as a matrix equation by Ax = b, or in full

Matrices Gaussian elimination Determinants. Graphics 2009/2010, period 1. Lecture 4: matrices

Undergraduate Mathematical Economics Lecture 1

Basic Linear Algebra in MATLAB

MATH 2030: MATRICES ,, a m1 a m2 a mn If the columns of A are the vectors a 1, a 2,...,a n ; A is represented as A 1. .

Mathematics 22: Lecture 5

Graduate Mathematical Economics Lecture 1

Matrix Algebra Determinant, Inverse matrix. Matrices. A. Fabretti. Mathematics 2 A.Y. 2015/2016. A. Fabretti Matrices

TOPIC 2 Computer application for manipulating matrix using MATLAB

Computational Foundations of Cognitive Science. Addition and Scalar Multiplication. Matrix Multiplication

Vector, Matrix, and Tensor Derivatives

TOPIC III LINEAR ALGEBRA

Mathematics 22: Lecture 11

Matrix & Linear Algebra

William Stallings Copyright 2010

[ Here 21 is the dot product of (3, 1, 2, 5) with (2, 3, 1, 2), and 31 is the dot product of

Definition. A matrix is a rectangular array of numbers enclosed by brackets (plural: matrices).

DM559 Linear and Integer Programming. Lecture 3 Matrix Operations. Marco Chiarandini

3. Replace any row by the sum of that row and a constant multiple of any other row.

3. Vector spaces 3.1 Linear dependence and independence 3.2 Basis and dimension. 5. Extreme points and basic feasible solutions

2.1 Matrices. 3 5 Solve for the variables in the following matrix equation.

Transcription:

Mathematics 13: Lecture 10 Matrices Dan Sloughter Furman University January 25, 2008 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 1 / 19

Matrices Recall: A matrix is a rectangular array of numbers. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 2 / 19

Matrices Recall: A matrix is a rectangular array of numbers. A matrix with m rows and n columns is an m n matrix. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 2 / 19

Matrices Recall: A matrix is a rectangular array of numbers. A matrix with m rows and n columns is an m n matrix. The number in the ith row and jth column of a matrix is the (i, j)-entry of the matrix. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 2 / 19

Examples A 2 3 matrix: [ ] 1 2 8. 1 0 3 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 3 / 19

Examples A 2 3 matrix: [ ] 1 2 8. 1 0 3 A 4 2 matrix: 2 4 3 1 5 6. 3 8 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 3 / 19

Notation We may denote a general m n matrix A as a 11 a 12 a 13 a 1n a 21 a 22 a 23 a 2n A =....... a m1 a m2 a m3 a mn Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 4 / 19

Notation We may denote a general m n matrix A as a 11 a 12 a 13 a 1n a 21 a 22 a 23 a 2n A =....... a m1 a m2 a m3 a mn For a more compact notation, we will often write simply A = [a ij ]. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 4 / 19

Algebraic operations If A = [a ij ] and B = [b ij ] are both m n matrices and c is a scalar, then we define Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 5 / 19

Algebraic operations If A = [a ij ] and B = [b ij ] are both m n matrices and c is a scalar, then we define A + B = [aij + b ij ], Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 5 / 19

Algebraic operations If A = [a ij ] and B = [b ij ] are both m n matrices and c is a scalar, then we define A + B = [aij + b ij ], ca = [ca ij ]. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 5 / 19

Algebraic operations If A = [a ij ] and B = [b ij ] are both m n matrices and c is a scalar, then we define A + B = [aij + b ij ], ca = [ca ij ]. That is, we add two matrices of the same size by adding their respective entries, term by term, and we multiply a matrix by a scalar by multiplying each entry by the scalar. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 5 / 19

Algebraic operations If A = [a ij ] and B = [b ij ] are both m n matrices and c is a scalar, then we define A + B = [aij + b ij ], ca = [ca ij ]. That is, we add two matrices of the same size by adding their respective entries, term by term, and we multiply a matrix by a scalar by multiplying each entry by the scalar. Note: This generalizes addition and scalar multiplication of vectors. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 5 / 19

Examples Let 1 2 0 5 A = 3 4 and B = 8 13. 10 3 1 2 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 6 / 19

Examples Let Then 1 2 0 5 A = 3 4 and B = 8 13. 10 3 1 2 A + B = 1 7 3 6 5 9 and 3A = 9 12. 11 1 30 9 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 6 / 19

Transposition If A = [a ij ] is an m n matrix, then we call the n m matrix the transpose of A. A T = [b ij ] where b ij = a ji Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 7 / 19

Transposition If A = [a ij ] is an m n matrix, then we call the n m matrix the transpose of A. A T = [b ij ] where b ij = a ji That is, we obtain A T by reflecting A across its diagonal entries (the entries a 11, a 22,..., a mm ). Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 7 / 19

Transposition If A = [a ij ] is an m n matrix, then we call the n m matrix the transpose of A. A T = [b ij ] where b ij = a ji That is, we obtain A T by reflecting A across its diagonal entries (the entries a 11, a 22,..., a mm ). That is, the columns of A are the rows of A T and the rows of A are the columns of A T. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 7 / 19

Examples If 2 3 A = 1 0, then A T = 5 4 [ 2 1 ] 5 3 0 4 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 8 / 19

Examples If If 2 3 A = 1 0, then A T = 5 4 [ 2 1 ] 5 3 0 4 1 B = 2, then B T = [ 1 2 3 ]. 3 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 8 / 19

Examples If If 2 3 A = 1 0, then A T = 5 4 [ 2 1 ] 5 3 0 4 1 B = 2, then B T = [ 1 2 3 ]. 3 Note: If B is a column matrix, then B T is a row matrix (and vice versa). Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 8 / 19

Symmetric matrices We say a matrix A is symmetric if A T = A. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 9 / 19

Symmetric matrices We say a matrix A is symmetric if A T = A. A symmetric matrix is necessarily a square matrix, that is, a matrix with the same number of rows and columns. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 9 / 19

Symmetric matrices We say a matrix A is symmetric if A T = A. A symmetric matrix is necessarily a square matrix, that is, a matrix with the same number of rows and columns. Examples: If A = [ ] 1 2 2 3 and B = then A is symmetric and B is not symmetric. [ ] 1 2, 3 4 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 9 / 19

Some Octave Let A = [ ] 1 2 3 1 5 7 and B = [ ] 1 3 8. 10 9 1 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 10 / 19

Some Octave Let A = [ ] 1 2 3 1 5 7 and B = [ ] 1 3 8. 10 9 1 Octave commands to input A and B: A = [1 2 3; -1 5 7] B = [-1 3 8; -10 9 1] Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 10 / 19

Some Octave Let A = [ ] 1 2 3 1 5 7 and B = [ ] 1 3 8. 10 9 1 Octave commands to input A and B: A = [1 2 3; -1 5 7] B = [-1 3 8; -10 9 1] Octave commands to compute A + B, 4B, and 4A 7B: A + B 4*B 4*A - 7*B Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 10 / 19

Some Octave Let A = [ ] 1 2 3 1 5 7 and B = [ ] 1 3 8. 10 9 1 Octave commands to input A and B: A = [1 2 3; -1 5 7] B = [-1 3 8; -10 9 1] Octave commands to compute A + B, 4B, and 4A 7B: A + B 4*B 4*A - 7*B To find A T : A Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 10 / 19

Example Two companies, A and B, each purchase three different types of widgets, α, β, and γ, to manufacture their respective products. They may purchase their widgets from one of two suppliers, I and II. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 11 / 19

Example Two companies, A and B, each purchase three different types of widgets, α, β, and γ, to manufacture their respective products. They may purchase their widgets from one of two suppliers, I and II. The following two arrays specify the demand that each company has for each type of widget and the price each supplier charges for the respective types of widgets: Widget α Widget β Widget γ Company A 600 300 1000 Compnay B 400 800 500 Supplier I Supplier II Widget α 1.00 1.50 Widget β 4.00 3.00 Widget γ 1.00 2.00 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 11 / 19

Example (cont d) The cost for Company A to purchase widgets from Supplier I is then 600 1.00 + 300 4.00 + 1000 1.00 = 2800.00 and the cost from Supplier II is 600 1.50 + 300 3.00 + 1000 2.00 = 3800.00. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 12 / 19

Example (cont d) The cost for Company A to purchase widgets from Supplier I is then 600 1.00 + 300 4.00 + 1000 1.00 = 2800.00 and the cost from Supplier II is 600 1.50 + 300 3.00 + 1000 2.00 = 3800.00. For Company B, the cost from Supplier I is 400 1.00 + 800 4.00 + 500 1.00 = 4100.00 and from Supplier II is 400 1.50 + 800 3.00 + 500 2.00 = 4000.00. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 12 / 19

Example (cont d) The cost for Company A to purchase widgets from Supplier I is then 600 1.00 + 300 4.00 + 1000 1.00 = 2800.00 and the cost from Supplier II is 600 1.50 + 300 3.00 + 1000 2.00 = 3800.00. For Company B, the cost from Supplier I is 400 1.00 + 800 4.00 + 500 1.00 = 4100.00 and from Supplier II is 400 1.50 + 800 3.00 + 500 2.00 = 4000.00. Note: These are the dot products of the rows of the first array with the columns of the second array. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 12 / 19

Example (cont d) Note: we may also present the preceding costs in an array: Suppier I Supplier II Company A 2800.00 3800.00 Company B 4100.00 4000.00 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 13 / 19

Example (cont d) Note: we may also present the preceding costs in an array: Suppier I Supplier II Company A 2800.00 3800.00 Company B 4100.00 4000.00 Now let D be the demand matrix formed from our first array, P be the price matrix formed from our second array, and C be the cost matrix formed from the last array. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 13 / 19

Example (cont d) That is, let D = and C = [ ] 600 300 1000, P = 400 800 500 [ ] 2800.00 3800.00. 4100.00 4000.00 1.00 1.50 4.00 3.00, 1.00 2.00 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 14 / 19

Example (cont d) That is, let D = and C = [ ] 600 300 1000, P = 400 800 500 [ ] 2800.00 3800.00. 4100.00 4000.00 1.00 1.50 4.00 3.00, 1.00 2.00 If we let D = [d ij ], P = [p ij ], and C = [c ij ], then we have c 11 = d 11 p 11 + d 12 p 21 + d 13 p 31, c 21 = d 21 p 11 + d 22 p 21 + d 23 p 31, c 12 = d 11 p 12 + d 12 p 22 + d 13 p 32, c 22 = d 21 p 12 + d 22 p 22 + d 23 p 32. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 14 / 19

Example (cont d) That is, let D = and C = [ ] 600 300 1000, P = 400 800 500 [ ] 2800.00 3800.00. 4100.00 4000.00 1.00 1.50 4.00 3.00, 1.00 2.00 If we let D = [d ij ], P = [p ij ], and C = [c ij ], then we have c 11 = d 11 p 11 + d 12 p 21 + d 13 p 31, c 21 = d 21 p 11 + d 22 p 21 + d 23 p 31, c 12 = d 11 p 12 + d 12 p 22 + d 13 p 32, c 22 = d 21 p 12 + d 22 p 22 + d 23 p 32. We will call C the product of D and P and write C = DP. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 14 / 19

Matrix product If A = [a ij ] is an m n matrix and B = [b ij ] is an n p matrix, then the product of A and B is the m p matrix whose (i, j)-entry is the dot product of the ith row of A with the jth column of B. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 15 / 19

Matrix product If A = [a ij ] is an m n matrix and B = [b ij ] is an n p matrix, then the product of A and B is the m p matrix whose (i, j)-entry is the dot product of the ith row of A with the jth column of B. That is, if C = [c ij ] = AB, then c ij = n a ik b kj = a i1 b 1j + a i2 b 2j + + a in b nj. k=1 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 15 / 19

Examples We have [ ] 6 [ ] 1 2 3 3 1 10 1 38 =. 1 0 4 5 22 2 4 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 16 / 19

Examples We have [ ] 6 [ ] 1 2 3 3 1 10 1 38 =. 1 0 4 5 22 2 4 And [ ] [ ] 1 2 0 5 = 1 3 6 1 but [ ] [ ] 0 5 1 2 = 6 1 1 3 [ ] 12 7, 18 2 [ ] 5 15. 5 15 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 16 / 19

Examples We have [ ] 6 [ ] 1 2 3 3 1 10 1 38 =. 1 0 4 5 22 2 4 And [ ] [ ] 1 2 0 5 = 1 3 6 1 but [ ] [ ] 0 5 1 2 = 6 1 1 3 [ ] 12 7, 18 2 [ ] 5 15. 5 15 Note: AB may not be equal to BA even if both exist and are the same size. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 16 / 19

Definition We call the n n matrix 1 0 0 0 0 1 0 0 I =....... 0 0 0 1 the identity matrix. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 17 / 19

Definition We call the n n matrix 1 0 0 0 0 1 0 0 I =....... 0 0 0 1 the identity matrix. If A is m n, then AI n = A. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 17 / 19

Definition We call the n n matrix 1 0 0 0 0 1 0 0 I =....... 0 0 0 1 the identity matrix. If A is m n, then AI n = A. If B is n p, then I n B = B. Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 17 / 19

Octave commands To find the product of matrices A and B: A*B Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 18 / 19

Octave commands To find the product of matrices A and B: A*B To find the 10 th power of a square matrix (that is, a matrix with the same number of rows and columns): A^10 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 18 / 19

Example The system of equations 3x + 4y 7z = 6 x y + z = 5 may be written as [ 3 4 7 1 1 1 ] x y = z [ ] 6. 5 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 19 / 19

Example The system of equations 3x + 4y 7z = 6 x y + z = 5 may be written as [ 3 4 7 1 1 1 ] x y = z [ ] 6. 5 Or as A x = b, where A = [ ] 3 4 7, x = 1 1 1 x y, and b = z [ ] 6. 5 Dan Sloughter (Furman University) Mathematics 13: Lecture 10 January 25, 2008 19 / 19