1 Linear Algebraic Equations and Matrices. Three Individuals Connected by Bungee Cords.

Slides:



Advertisements
Similar presentations
Chapter 3 Determinants and Eigenvectors 大葉大學 資訊工程系 黃鈴玲 Linear Algebra.
Advertisements

Matrix Algebra Matrix algebra is a means of expressing large numbers of calculations made upon ordered sets of numbers. Often referred to as Linear Algebra.
Systems of Linear Equations and Matrices
SOLVING SYSTEMS OF LINEAR EQUATIONS. Overview A matrix consists of a rectangular array of elements represented by a single symbol (example: [A]). An individual.
MF-852 Financial Econometrics
Linear Algebraic Equations
Solution of Simultaneous Linear Algebraic Equations: Lecture (I)
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
Matrices and Systems of Equations
Chapter 8 Linear Algebraic Equations and Matrices.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 14 Elimination Methods.
Chapter 2 Matrices Definition of a matrix.
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.
ECIV 520 Structural Analysis II Review of Matrix Algebra.
MOHAMMAD IMRAN DEPARTMENT OF APPLIED SCIENCES JAHANGIRABAD EDUCATIONAL GROUP OF INSTITUTES.
2005/8Matrices-1 Matrices. 2005/8Matrices-2 A Matrix over a Field F (R or C) m rows n columns size: m×n ij-entry: a ij  F (ij-component)
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
化工應用數學 授課教師: 郭修伯 Lecture 9 Matrices
Lecture 7: Matrix-Vector Product; Matrix of a Linear Transformation; Matrix-Matrix Product Sections 2.1, 2.2.1,
Arithmetic Operations on Matrices. 1. Definition of Matrix 2. Column, Row and Square Matrix 3. Addition and Subtraction of Matrices 4. Multiplying Row.
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:
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.
Chapter 7 Matrix Mathematics Matrix Operations Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Compiled By Raj G. Tiwari
2.1 Operations with Matrices 2.2 Properties of Matrix Operations
ECON 1150 Matrix Operations Special Matrices
Chapter 2A Matrices 2A.1 Definition, and Operations of Matrices: 1 Sums and Scalar Products; 2 Matrix Multiplication 2A.2 Properties of Matrix Operations;
Chap. 2 Matrices 2.1 Operations with Matrices
Review of Matrices Or A Fast Introduction.
CSE123 Lecture 5 Arrays and Array Operations. Definitions Scalars: Variables that represent single numbers. Note that complex numbers are also scalars,
Array Addition  Two arrays can be added if and only if both arrays have exactly the same dimensions.  Assuming the dimension requirement is satisfied,
Statistics and Linear Algebra (the real thing). Vector A vector is a rectangular arrangement of number in several rows and one column. A vector is denoted.
Chapter 2 Basic Linear Algebra ( 基本線性代數 ) to accompany Operations Research: Applications and Algorithms 4th edition by Wayne L. Winston Copyright (c)
Matrices Addition & Subtraction Scalar Multiplication & Multiplication Determinants Inverses Solving Systems – 2x2 & 3x3 Cramer’s Rule.
1 C ollege A lgebra Systems and Matrices (Chapter5) 1.
10.4 Matrix Algebra 1.Matrix Notation 2.Sum/Difference of 2 matrices 3.Scalar multiple 4.Product of 2 matrices 5.Identity Matrix 6.Inverse of a matrix.
Matrix Algebra and Regression a matrix is a rectangular array of elements m=#rows, n=#columns  m x n a single value is called a ‘scalar’ a single row.
Linear Algebra 1.Basic concepts 2.Matrix operations.
Fundamentals of Engineering Analysis
Chapter 6 Systems of Linear Equations and Matrices Sections 6.3 – 6.5.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
MT411 Robotic Engineering Asian Institution of Technology (AIT) Chapter 1 Introduction to Matrix Narong Aphiratsakun, D.Eng.
Matrices and Determinants
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.
LEARNING OUTCOMES At the end of this topic, student should be able to :  D efination of matrix  Identify the different types of matrices such as rectangular,
Unit 3: Matrices. Matrix: A rectangular arrangement of data into rows and columns, identified by capital letters. Matrix Dimensions: Number of rows, m,
Chapter 2 Matrices 2.1 Operations with Matrices 2.2 Properties of Matrix Operations 2.3 The Inverse of a Matrix 2.4 Elementary Matrices Elementary Linear.
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.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 3 - Chapter 8 Linear Algebraic Equations and Matrices.
Matrices. Variety of engineering problems lead to the need to solve systems of linear equations matrixcolumn vectors.
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.
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00.
Matrices Introduction.
College Algebra Chapter 6 Matrices and Determinants and Applications
MTH108 Business Math I Lecture 20.
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.
Linear Algebra Lecture 2.
Chapter 7 Matrix Mathematics
Linear Algebraic Equations and Matrices
Matrix Algebra.
Lecture 11 Matrices and Linear Algebra with MATLAB
Unit 3: Matrices
Matrices.
Matrix Algebra.
Basics of Linear Algebra
Rayat Shikshan Sanstha’s S.M.Joshi College, Hadapsar -28
Presentation transcript:

1 Linear Algebraic Equations and Matrices

Three Individuals Connected by Bungee Cords

Free-body Diagrams  Newton’s second law 3 Rearrange equations [K] {x} = {b}

Newton’s Second Law – Equation of Motion  Mass-spring system (similar to bungee jumpers)  Kirchhoff’s current and voltage rules 4 Resistor circuits

 Solved a single equation  Now consider more than one variable and more than one equation Linear Algebraic Equations

Linear Systems  Linear equations and constant coefficients  a ij and b i are constants 6

Mathematical Background  Write system of equations in matrix-vector form 7

Solving Systems of Linear Equations  Two ways to solve systems of linear algebraic equations [A]{x}={b}  Left-division x = A\b  Matrix inversion x = inv(A)*b  Matrix inversion only works for square, non- singular systems  Less efficient than left-division 8

向量的乘法、除法  向量的乘法 >>x=[1 2 3]; >>pi*x % 純量乘向量 ans = >>x=[1 2 3]; >>y=[4 5 6]; >>x.*y % 向量乘向量 ans =  向量的除法運算在代數系統 實未定義,但在 MATLAB 中 x./y 表示 x.\y 表示 >>x=[1 2 3]; >>y=[4 5 6]; >>x./y % 向量除向量 ans =

Matrix Notations 10 Column 4 Row 3 (second index) (first index)

矩陣的索引與下標 11

Scalars, Vectors, Matrices  MATLAB treats variables as “matrices”  Matrix (m  n) - a set of numbers arranged in rows (m) and columns (n)  Scalar: 1  1 matrix  Row Vector: 1  n matrix  Column Vector: m  1 matrix 12

Matrix Operations  Transpose ( 轉置 )  In MATLAB, transpose is A  Trace is sum of diagonal elements  In MATLAB, trace(A) 13

Matrix Transpose 14

Special Matrices  Symmetric matrices 15 a ij = a ji [A] T = [A]

Special Matrices  Diagonal matrix 16 [A][I] = [I][A] = [A]  Identity matrix ( 單位矩陣 )

Special Matrices  Banded matrix – all elements are zero, with the exception of a band centered on the main diagonal 17 Tridiagonal – three non-zero bands

Special Matrices  Lower triangular  Upper triangular 18

 Matrix identity [A] = [B] if and only if a ij = b ij for all i and j  Matrix addition and subtraction [C] = [A] + [B]  C ij = A ij + B ij [C] = [A]  [B]  C ij = A ij  B ij  Commutative [A] + [B] = [B] + [A] [A]  [B] =  [B] + [A]  Associative ( [A] + [B] ) + [C] = [A] + ( [B] + [C] ) ( [A] + [B] )  [C] = [A] + ( [B]  [C] ) ( [A]  [B] ) + [C] = [A] + (  [B] + [C] ) Matrix Operations

g = 5 Multiplication of Matrix by a Scalar

Matrix Multiplication  Visual depiction of how the rows and columns line up in matrix multiplication 21

[A]*[B]  [B]*[A] Matrix Multiplication

 Matrix multiplication can be performed only if the inner dimensions are equal 23

Matrix Multiplication  Interior dimensions have to be equal  For a vector  We will be using square matrices 24

Matrix Multiplications  MATLAB performs matrix multiplication automatically A*B = C  Note: no period ‘.’ (not element-by-element operation)  For vectors A*x = b  Associative ( [A] [B] ) [C] = [A] ( [B] [C] )  Distributive [A] ( [B] + [C] ) = [A] [B] + [A] [C] ([A] + [B] ) [C] = [A] [C] + [B] [C]  Not generally commutative [A] [B]  [B] [A] 25

Matrix Inverse  Matrix division is undefined  However, there is a matrix inverse for non-singular square matrices [A] -1 [A] = [A] [A] -1 = [I]  Multiplication of a matrix by the inverse is analogous to division 26

Augmentation  Whatever you do to left-hand-side, do to the right- hand side (useful when solving system of equations) 27

Augmented Matrix

>> A = [ ; ; ; ] A = >> A' ans = Create a matrix Matrix transpose MATLAB Matrix Manipulations

 Matrix concatenation >> x = [ ]; >> y = [ ]; >> z = [ ]; >> B = [x; y; x; z] B = >> C = A + B C = >> C = C – B ( = A) C =

MATLAB Matrix Manipulations  Matrix multiplication, element-by-element operation 31 A = B = >> A*B ans = >> A.*B ans = A*B  A.*B

>> D = [ ; ; ] D = >> A*D ??? Error using ==> * Inner matrix dimensions must agree. >> D*A ans = A = Inner dimension must agree A*D  D*A MATLAB Matrix Manipulations

>> A = [ ; ; ; ] >> format short; AI = inv(A) AI = >> A*AI ans = Matrix Inverse MATLAB Matrix Manipulations

>> A = [ ; ; ; ] >> I = eye(4) I = >> Aug = [A I] Aug = >> [n, m] = size(Aug) n = 4 m = 8 Matrix Augmentation MATLAB Matrix Manipulations

[K] {x} = {b} JumperMass (kg)Spring constant (N/m)Unstretched cord length (m) Top (1) Middle (2) Bottom (3) Bungee Jumpers

>> k1 = 50; k2 = 100; k3 = 50; >> K=[k1+k2 -k2 0;-k2 k2+k3 -k3;0 -k3 k3] K = >> format short >> g = 9.81; mg = [60; 70; 80]*g mg = >> x=K\mg x = >> xi = [20; 40; 60]; >> xf = xi + x xf = >> x = inv(K)*mg x = k 1 = 50 k 2 = 100 stiffer cord k 3 = 50 Final positions of bungee jumpers

Kirchhoff’s Current and Voltage Rules  Example i 43 i 32 i 54 i 52 i 65 i 12

Kirchhoff’s Current and Voltage Rules  Example

>> A = [ ]; >> b = [ ]'; >> current = A\b current =