(Linear equations) Applied Linear Algebra in Geoscience Using MATLAB

Similar documents
(Mathematical Operations with Arrays) Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB

Applied Linear Algebra in Geoscience Using MATLAB

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

ANSWERS. E k E 2 E 1 A = B

Remark 1 By definition, an eigenvector must be a nonzero vector, but eigenvalue could be zero.

Remark By definition, an eigenvector must be a nonzero vector, but eigenvalue could be zero.

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Chapter 5. Linear Algebra. A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

Numerical Linear Algebra

2. Every linear system with the same number of equations as unknowns has a unique solution.

Linear Algebra Practice Problems

Math 2331 Linear Algebra

Chapter 5. Linear Algebra. Sections A linear (algebraic) equation in. unknowns, x 1, x 2,..., x n, is. an equation of the form

MATH 1120 (LINEAR ALGEBRA 1), FINAL EXAM FALL 2011 SOLUTIONS TO PRACTICE VERSION

MAC1105-College Algebra. Chapter 5-Systems of Equations & Matrices

Matrices and systems of linear equations

MATH 2331 Linear Algebra. Section 1.1 Systems of Linear Equations. Finding the solution to a set of two equations in two variables: Example 1: Solve:

MAT Linear Algebra Collection of sample exams

Properties of Linear Transformations from R n to R m

Lecture Summaries for Linear Algebra M51A

Linear Algebra I for Science (NYC)

MATH 304 Linear Algebra Lecture 34: Review for Test 2.

MTH 2032 Semester II

L3: Review of linear algebra and MATLAB

Section 1.1 System of Linear Equations. Dr. Abdulla Eid. College of Science. MATHS 211: Linear Algebra

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

Pre-Calculus I. For example, the system. x y 2 z. may be represented by the augmented matrix

Math "Matrix Approach to Solving Systems" Bibiana Lopez. November Crafton Hills College. (CHC) 6.3 November / 25

MATH 2331 Linear Algebra. Section 2.1 Matrix Operations. Definition: A : m n, B : n p. Example: Compute AB, if possible.

Maths for Signals and Systems Linear Algebra for Engineering Applications

Linear Algebra. Matrices Operations. Consider, for example, a system of equations such as x + 2y z + 4w = 0, 3x 4y + 2z 6w = 0, x 3y 2z + w = 0.

Glossary of Linear Algebra Terms. Prepared by Vince Zaccone For Campus Learning Assistance Services at UCSB

Numerical Linear Algebra Homework Assignment - Week 2

Reduction to the associated homogeneous system via a particular solution

LINEAR ALGEBRA 1, 2012-I PARTIAL EXAM 3 SOLUTIONS TO PRACTICE PROBLEMS

Relationships Between Planes

MATHEMATICS FOR COMPUTER VISION WEEK 2 LINEAR SYSTEMS. Dr Fabio Cuzzolin MSc in Computer Vision Oxford Brookes University Year

MATH 304 Linear Algebra Lecture 20: The Gram-Schmidt process (continued). Eigenvalues and eigenvectors.

Solving Systems of Linear Equations Using Matrices

MATRICES. knowledge on matrices Knowledge on matrix operations. Matrix as a tool of solving linear equations with two or three unknowns.

Conceptual Questions for Review

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

Linear Algebra- Final Exam Review

MTH Linear Algebra. Study Guide. Dr. Tony Yee Department of Mathematics and Information Technology The Hong Kong Institute of Education

Fall 2016 MATH*1160 Final Exam

MAC Module 12 Eigenvalues and Eigenvectors. Learning Objectives. Upon completing this module, you should be able to:

MAC Module 12 Eigenvalues and Eigenvectors

Math 102, Winter Final Exam Review. Chapter 1. Matrices and Gaussian Elimination

12/1/2015 LINEAR ALGEBRA PRE-MID ASSIGNMENT ASSIGNED BY: PROF. SULEMAN SUBMITTED BY: M. REHAN ASGHAR BSSE 4 ROLL NO: 15126

Numerical Linear Algebra

Lecture 18: Section 4.3

DM559 Linear and Integer Programming. Lecture 2 Systems of Linear Equations. Marco Chiarandini

Chapter 7. Tridiagonal linear systems. Solving tridiagonal systems of equations. and subdiagonal. E.g. a 21 a 22 a A =

The value of a problem is not so much coming up with the answer as in the ideas and attempted ideas it forces on the would be solver I.N.

Linear Equations in Linear Algebra

and let s calculate the image of some vectors under the transformation T.

Linear Algebra Using MATLAB

Midterm 1 Review. Written by Victoria Kala SH 6432u Office Hours: R 12:30 1:30 pm Last updated 10/10/2015

Chap 3. Linear Algebra

1 Number Systems and Errors 1

Linear System Equations

Matrices and RRE Form

5.7 Cramer's Rule 1. Using Determinants to Solve Systems Assumes the system of two equations in two unknowns

There are six more problems on the next two pages

Preliminary/Qualifying Exam in Numerical Analysis (Math 502a) Spring 2012

TI89 Titanium Exercises - Part 10.

Math 307 Learning Goals. March 23, 2010

1. Let m 1 and n 1 be two natural numbers such that m > n. Which of the following is/are true?

Online Exercises for Linear Algebra XM511

1 - Systems of Linear Equations

Review problems for MA 54, Fall 2004.

IMPORTANT DEFINITIONS AND THEOREMS REFERENCE SHEET

9.1 - Systems of Linear Equations: Two Variables

Math Computation Test 1 September 26 th, 2016 Debate: Computation vs. Theory Whatever wins, it ll be Huuuge!

Math 1553, Introduction to Linear Algebra

System of Linear Equations

Math 4A Notes. Written by Victoria Kala Last updated June 11, 2017

MATH 240 Spring, Chapter 1: Linear Equations and Matrices

Systems of Linear Equations and Matrices

Linear Algebra in Actuarial Science: Slides to the lecture

Quiz ) Locate your 1 st order neighbors. 1) Simplify. Name Hometown. Name Hometown. Name Hometown.

Study Guide for Linear Algebra Exam 2

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 1 x 2. x n 8 (4) 3 4 2

Extra Problems: Chapter 1

Section 1.1: Systems of Linear Equations

Linear Equations in Linear Algebra

1. What is the determinant of the following matrix? a 1 a 2 4a 3 2a 2 b 1 b 2 4b 3 2b c 1. = 4, then det

Math 4377/6308 Advanced Linear Algebra

Systems of Linear Equations and Matrices

Chapter 1: Systems of Linear Equations and Matrices

Linear Algebra March 16, 2019

Linear Algebra, part 3 QR and SVD

MATH 3511 Lecture 1. Solving Linear Systems 1

Systems of Linear Equations. By: Tri Atmojo Kusmayadi and Mardiyana Mathematics Education Sebelas Maret University

Math 1314 Week #14 Notes

MAC Module 3 Determinants. Learning Objectives. Upon completing this module, you should be able to:

Lecture 12: Solving Systems of Linear Equations by Gaussian Elimination

LU Factorization. A m x n matrix A admits an LU factorization if it can be written in the form of A = LU

Transcription:

Applied Linear Algebra in Geoscience Using MATLAB (Linear equations)

Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in MATLAB User-Defined Functions and Function Files Polynomials, Curve Fitting, and Interpolation Applications in Numerical Analysis Three-Dimensional Plots Symbolic Math Matrices Linear equations Determinants Eigenvalues and eigenvectors Orthogonal vectors and matrices Vector and matrix norms Gaussian elimination and the LU dec. Linear system applications Gram-Schmidt decomposition The singular value decomposition Least-squares problems Implementing the QR factorization The algebraic eigenvalue problem

Recap The system of three equations with three unknowns EX.1

Introduction to Linear Equation A system of n linear equations in n unknowns x 1, x 2,..., x n is a family of equations We wish to determine if such a system has a solution, that is to find out if there exist numbers x 1, x 2,..., x n that satisfy each of the equations simultaneously. We say that the system is consistent if it has a solution. Otherwise, the system is called inconsistent. Geometrically, solving a system of linear equations in two (or three) unknowns is equivalent to determining whether or not a family of lines (or planes) has a common point of intersection. coefficient matrix augmented matrix upper triangular

Introduction to Linear Equation Find a polynomial of degree three, which passes through the points: ( 3, 2), ( 1, 2), (1, 5), (2, 1) AX = b

Row equivalence Matrix A is row-equivalent to matrix B if B is obtained from A by a sequence of elementary row operations. It is not difficult to prove that if A and B are row-equivalent augmented matrices of two systems of linear equations. then the two systems have the same solution sets

Gaussian elimination Gaussian elimination performs row operations on the augmented matrix until the portion corresponding to the coefficient matrix is reduced to upper-triangular form. In upper-triangular form, a simple procedure known as back substitution determines the solution. EX.2

Systematic solution if we perform elementary row operations on the augmented matrix of the system and get a matrix with one of its rows equal to [0 0 0... 0 b], where b 0, or a row of the form [0 0 0... 0], then the system is said to be inconsistent. In this situation, there may be no solution or infinitely many solutions.

Computing The Inverse The matrix is singular if during back substitution you obtain a row of zeros in the coefficient matrix.

Homogeneous systems is always consistent since x 1 = 0,...,x n = 0 is a solution. This solution is called the trivial solution, and any other solution is called a nontrivial solution. To solve a system of the form Ax = 0, there is no reason to form the augmented matrix, since all components will remain zero during row elimination. After reduction to uppertriangular form, if the element in position(n, n)is nonzero, the system has the unique solution x = 0; otherwise, there is an infinite number of solutions, and the matrix A is singular.

Application: A Trus A truss is a structure normally containing triangular units constructed of straight members with ends connected at joints referred to as pins. Trusses are the primary structural component of many bridges. External forces and reactions to those forces are considered to act only at the pins and result in internal forces in the members, which are either tensile or compressive.

Matrix Factorization In algebra, the polynomial x 2 5x + 6 can be factored as (x 3)(x 2). Under the right conditions, a matrix can also be factored. matrix factorization, a topic of great importance in numerical linear algebra. A bidiagonal matrix is a matrix with nonzero entries along the main diagonal and either the diagonal above or the diagonal below. The matrix B1 is an upper bidiagonal matrix and B2 is a lower bidiagonal matrix. A tridiagonal matrix has only nonzero entries along the main diagonal and the diagonals above and below. T is a tridiagonal matrix

Matrix Factorization Using the MATLAB command diag, build the tridiagonal matrix T :

Positive Definite If A is an n n matrix, and vector x is an n 1 column vector, then x T is a 1 n row vector. Consider the product x T Ax. The product is of dimension (1 n) (n n) (n 1) = 1 1, or a scalar. A symmetric matrix with the property that x T Ax > 0 for all x 0 is said to be positive definite. Positive definite matrices play a role in many fields of engineering and science. We will study these matrices later in this course. A positive definite matrix can be uniquely factored into the product R T R, where R is an uppertriangular matrix. The MATLAB command gallery produces many different kinds of matrices to use for testing purposes. It generates a 5 5 positive-definite matrix. The command chol(a) computes the matrix R. Use it to find the factorization R T R of A.

Matlab - display MATLAB automatically generates a display is not displayed if a semicolon is typed at the end The disp Command Only one variable can be displayed in a disp command. If elements of two variables need to be displayed together, a new variable (that contains the elements to be displayed) must first be defined and then displayed.

Output Commands The fprintf Command The fprintf command can be used to display output (text and data) on the screen or to save it to a file. With this command (unlike with the disp command) the output can be formatted. Using the fprintf command to display text: example It is possible to start a new line in the middle of the string When a program has more than one fprintf command, the display generated is continuous! \b Backspace. \t Horizontal tab

Output Commands Using the fprintf command to display a mix of text and numerical data. The first number (5 in the example) is the field width the second number (2 in the example) is the precision The display generated by the fprintf command combines text and a number.

Output Commands With the fprintf command it is possible to insert more than one number (value of a variable) within the text. Print theta, v and d using fprintf(?)

Output Commands The fprintf command is vectorized. This means that when a variable that is a vector or a matrix is included in the command, the command repeats itself until all the elements are displayed. If the variable is a matrix, the data is used column by column.

Output Commands Using the fprintf command to save output to a file In addition to displaying output in the Command Window, the fprintf command can be used for writing the output to a file when it is necessary to save the output. Writing output to a file requires three steps: a) Opening a file using the fopen command. b) Writing the output to the open file using the fprintf command. c) Closing the file using the fclose command.

Output Commands Step a: Step b: Step c: