EGR 106 – Week 4 – Math on Arrays

Slides:



Advertisements
Similar presentations
Slide deck by Dr. Greg Reese Miami University MATLAB An Introduction With Applications, 5 th Edition Dr. Amos Gilat The Ohio State University Chapter 3.
Advertisements

Lecture 7 Intersection of Hyperplanes and Matrix Inverse Shang-Hua Teng.
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
Lecture 9: Introduction to Matrix Inversion Gaussian Elimination Sections 2.4, 2.5, 2.6 Sections 2.2.3, 2.3.
Ch 7.2: Review of Matrices For theoretical and computation reasons, we review results of matrix theory in this section and the next. A matrix A is an m.
Math for CSLecture 21 Solution of Linear Systems of Equations Consistency Rank Geometric Interpretation Gaussian Elimination Lecture 2. Contents.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Matrix Mathematics in MATLAB and Excel
Finding the Inverse of a Matrix
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Modified Gary Larson Far Side cartoon
1 Chapter 3 Matrix Algebra with MATLAB Basic matrix definitions and operations were covered in Chapter 2. We will now consider how these operations are.
1 Chapter 2 Matrices Matrices provide an orderly way of arranging values or functions to enhance the analysis of systems in a systematic manner. Their.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Introduction to MATLAB 7 for Engineers William J. Palm.
Chapter 10 Review: Matrix Algebra
Introduction to MATLAB for Engineers, Third Edition William J. Palm III Chapter 8 Linear Algebraic Equations PowerPoint to accompany Copyright © 2010.
MATRICES AND DETERMINANTS
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. A Concise Introduction to MATLAB ® William J. Palm III.
ECON 1150 Matrix Operations Special Matrices
 Row and Reduced Row Echelon  Elementary Matrices.
Matrix Entry or element Rows, columns Dimensions Matrix Addition/Subtraction Scalar Multiplication.
Array Addition  Two arrays can be added if and only if both arrays have exactly the same dimensions.  Assuming the dimension requirement is satisfied,
Introduction to MATLAB CBE 502 Mathematical Methods of Engineering Analysis.
Learner’s Guide to MATLAB® Chapter 2 : Working with Arrays.
Fin500J Mathematical Foundations in Finance Topic 1: Matrix Algebra Philip H. Dybvig Reference: Mathematics for Economists, Carl Simon and Lawrence Blume,
CMPS 1371 Introduction to Computing for Engineers MATRICES.
2.5 - Determinants & Multiplicative Inverses of Matrices.
8.1 Matrices & Systems of Equations
Matrix Computations ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Lecture 28: Mathematical Insight and Engineering.
ENE MATHLAB ® Lecture 3: Matrix Review. Determinant  To use MATLAB to compute determinants:  Enter the determinant as an array.  Use ‘det’ command.
Matrices. Definitions  A matrix is an m x n array of scalars, arranged conceptually as m rows and n columns.  m is referred to as the row dimension.
Solving Linear Systems of Equations
Examples of linear transformation matrices Some special cases of linear transformations of two-dimensional space R 2 are illuminating:dimensional Dimoffree.svgDimoffree.svg‎
A string is an array of characters Strings have many uses in MATLAB Display text output Specify formatting for plots Input arguments for some functions.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
Matrix Computations ELEC 206 Computer Applications for Electrical Engineers Dr. Ron Hayne.
Introduction to Linear Algebra Mark Goldman Emily Mackevicius.
Introduction to MATLAB 7
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 1 Introduction to Matrix Narong Aphiratsakun, D.Eng.
TH EDITION LIAL HORNSBY SCHNEIDER COLLEGE ALGEBRA.
2.5 – Determinants and Multiplicative Inverses of Matrices.
Finishing up Chapter 5. Will this code enter the if statement? G=[30,55,10] if G
Linear Algebra Review Tuesday, September 7, 2010.
2 - 1 Chapter 2A Matrices 2A.1 Definition, and Operations of Matrices: 1 Sums and Scalar Products; 2 Matrix Multiplication 2A.2 Properties of Matrix Operations;
If A and B are both m × n matrices then the sum of A and B, denoted A + B, is a matrix obtained by adding corresponding elements of A and B. add these.
10.4 Matrix Algebra. 1. Matrix Notation A matrix is an array of numbers. Definition Definition: The Dimension of a matrix is m x n “m by n” where m =
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
1 Matrix Math ©Anthony Steed Overview n To revise Vectors Matrices.
College Algebra Chapter 6 Matrices and Determinants and Applications
MTH108 Business Math I Lecture 20.
Solving Linear Systems Syed Nasrullah
Linear Algebraic Equations and Matrices
Boyce/DiPrima 10th ed, Ch 7.2: Review of Matrices Elementary Differential Equations and Boundary Value Problems, 10th edition, by William E. Boyce and.
Lecture 2 Matrices Lat Time - Course Overview
Chapter 7 Matrix Mathematics
Finding the Inverse of a Matrix
Linear Algebraic Equations and Matrices
EGR 106 – Week 4 – Math on Arrays
Systems of First Order Linear Equations
Chapter 10: Solving Linear Systems of Equations
Matrix Algebra.
Chapter 7: Matrices and Systems of Equations and Inequalities
Review of Matrix Algebra
Matrices.
Matrix Algebra.
Multiply by 5/40 and sum with 2nd row
Presentation transcript:

EGR 106 – Week 4 – Math on Arrays Linear algebraic operations: Multiplication Division Row/column based operations Rest of chapter 3

Array Multiplication (Linear Algebra) In linear algebra, the matrix expression F = A * B means Entries are dot products of rows of the first matrix with columns of the second = *

For example:

Notes: The operation is generally not commutative A*B ≠ B*A The number of columns of the 1st must match the number of rows of the 2nd = * n by m n by k k by m

For example, here multiplication works both ways, but is not commutative: quite different!

And here it doesn’t work at all:

Application of Multiplication Application of matrix multiplication: n simultaneous equations in m unknowns (the x’s)

For example: In matrix form this is A * x = b with

column vectors (lower case) In general: A * x = b A is n by m x is m by 1 b is n by 1 column vectors (lower case)

Usages – finding: v cable tensions in statics fluid flow in piping heat flow in thermodynamics e.g. v currents in circuits traffic flow economics R1 R3 R2

Array Division Recall the command eye(n) This result is the array multiplication identity matrix I For any array A A * I = I * A = A must be properly sized!

Imagine that for square arrays A and B we have A * B = B * A = I then we call them inverses A = B–1 B = A–1 In Matlab: A ^ -1 or inv(A) When does A–1 exist? A is square A has a non-zero determinant (det(A))

For example:

A–1 *A * x = A–1* b so x = A–1* b = I = x Solving A * x = b Assume that A is square and det(A) ≠ 0 Multiply both sides by A–1 on the left A–1 *A * x = A–1* b so x = A–1* b In Matlab, x = A \ b or x = inv(A)*b = I = x backwards slash

For example: Check your work:

General Linear Equation Solving (not in the book!) Problem types: overdetermined underdetermined Solution methods: Cramer's method Gaussian elimination inverse matrix others Solution situations: non-singular: one unique solution singular: no solution many solutions MatLab does them all

Vector Based Operations Some operations analyze a vector to yield a single value. For example: sums the elements

Other operations for a vector A: Minimum: min(A) Maximum: max(A) Median: median(A) Mean or average: mean(A) Standard deviation: std(A) Product of the elements: prod(A)

Some operators yield two results: min and max can yield both the value and its location default is the first result

Some operators yield vector results size(A) we’ve already seen sort

Or multiple vectors:

Finally, when applied to an array, these operators perform their action on columns

the 2 means “use the 2nd dimension” i.e. spanning the columns Unless you instruct it to work on rows! the 2 means “use the 2nd dimension” i.e. spanning the columns

Use help to discover how to use these work