Typical Linear Equation Set and Corresponding Matrices



Similar documents
MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS. + + x 2. x n. a 11 a 12 a 1n b 1 a 21 a 22 a 2n b 2 a 31 a 32 a 3n b 3. a m1 a m2 a mn b m

Lecture 2 Matrix Operations

Using Microsoft Excel Built-in Functions and Matrix Operations. EGN 1006 Introduction to the Engineering Profession

MATRIX ALGEBRA AND SYSTEMS OF EQUATIONS

SYSTEMS OF EQUATIONS AND MATRICES WITH THE TI-89. by Joseph Collison

1 Introduction to Matrices

Using row reduction to calculate the inverse and the determinant of a square matrix

Question 2: How do you solve a matrix equation using the matrix inverse?

8 Square matrices continued: Determinants

Matrix Algebra in R A Minimal Introduction

Excel supplement: Chapter 7 Matrix and vector algebra

Solving simultaneous equations using the inverse matrix

Here are some examples of combining elements and the operations used:

Lecture 5: Singular Value Decomposition SVD (1)

7.4. The Inverse of a Matrix. Introduction. Prerequisites. Learning Style. Learning Outcomes

Linear Algebra Notes for Marsden and Tromba Vector Calculus

December 4, 2013 MATH 171 BASIC LINEAR ALGEBRA B. KITCHENS

8.2. Solution by Inverse Matrix Method. Introduction. Prerequisites. Learning Outcomes

Equations, Inequalities & Partial Fractions

Reciprocal Cost Allocations for Many Support Departments Using Spreadsheet Matrix Functions

MATHEMATICS FOR ENGINEERS BASIC MATRIX THEORY TUTORIAL 2

Introduction to Matrix Algebra

Solving Linear Systems, Continued and The Inverse of a Matrix

13 MATH FACTS a = The elements of a vector have a graphical interpretation, which is particularly easy to see in two or three dimensions.

a 11 x 1 + a 12 x a 1n x n = b 1 a 21 x 1 + a 22 x a 2n x n = b 2.

Solving Mass Balances using Matrix Algebra

8.1. Cramer s Rule for Solving Simultaneous Linear Equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

Introduction to Matrices for Engineers

Linear Algebra: Vectors

SOLVING COMPLEX SYSTEMS USING SPREADSHEETS: A MATRIX DECOMPOSITION APPROACH

Linear Equations ! $ & " % & " 11,750 12,750 13,750% MATHEMATICS LEARNING SERVICE Centre for Learning and Professional Development

1 Solving LPs: The Simplex Algorithm of George Dantzig

Matrix Differentiation

Data Mining: Algorithms and Applications Matrix Math Review

Linear Algebra Review. Vectors

26. Determinants I. 1. Prehistory

EXCEL SOLVER TUTORIAL

Operation Count; Numerical Linear Algebra

( ) which must be a vector

CS3220 Lecture Notes: QR factorization and orthogonal transformations

3.1. Solving linear equations. Introduction. Prerequisites. Learning Outcomes. Learning Style

MAT188H1S Lec0101 Burbulla

2x + y = 3. Since the second equation is precisely the same as the first equation, it is enough to find x and y satisfying the system

Chapter 7. Matrices. Definition. An m n matrix is an array of numbers set out in m rows and n columns. Examples. (

SOLVING LINEAR SYSTEMS

expression is written horizontally. The Last terms ((2)( 4)) because they are the last terms of the two polynomials. This is called the FOIL method.

Notes on Determinant

Math 2524: Activity 3 (Excel and Matrices, continued) Fall 2002

7. LU factorization. factor-solve method. LU factorization. solving Ax = b with A nonsingular. the inverse of a nonsingular matrix

Matrix Algebra. Some Basic Matrix Laws. Before reading the text or the following notes glance at the following list of basic matrix algebra laws.

K80TTQ1EP-??,VO.L,XU0H5BY,_71ZVPKOE678_X,N2Y-8HI4VS,,6Z28DDW5N7ADY013

Matrices 2. Solving Square Systems of Linear Equations; Inverse Matrices

Year 9 set 1 Mathematics notes, to accompany the 9H book.

Similar matrices and Jordan form

Systems of Linear Equations

Similarity and Diagonalization. Similar Matrices

Continued Fractions and the Euclidean Algorithm

Linear Programming. March 14, 2014

Solving Systems of Linear Equations Using Matrices

Name: Section Registered In:

1.2 Solving a System of Linear Equations

Department of Chemical Engineering ChE-101: Approaches to Chemical Engineering Problem Solving MATLAB Tutorial VI

Excel Basics By Tom Peters & Laura Spielman

Basic Formulas in Excel. Why use cell names in formulas instead of actual numbers?

Brief Introduction to Vectors and Matrices

Linear Algebra and TI 89

Solution of Linear Systems

MS-EXCEL: ANALYSIS OF EXPERIMENTAL DATA

5.5. Solving linear systems by the elimination method

Direct Methods for Solving Linear Systems. Matrix Factorization

MATH10212 Linear Algebra. Systems of Linear Equations. Definition. An n-dimensional vector is a row or a column of n numbers (or letters): a 1.

Factoring Polynomials and Solving Quadratic Equations

Chapter 19. General Matrices. An n m matrix is an array. a 11 a 12 a 1m a 21 a 22 a 2m A = a n1 a n2 a nm. The matrix A has n row vectors

Solution to Homework 2

Chapter 4. Spreadsheets

by the matrix A results in a vector which is a reflection of the given

MATH APPLIED MATRIX THEORY

Math 1050 Khan Academy Extra Credit Algebra Assignment

9 MATRICES AND TRANSFORMATIONS

1 Review of Least Squares Solutions to Overdetermined Systems

= = 3 4, Now assume that P (k) is true for some fixed k 2. This means that

DRAFT. Further mathematics. GCE AS and A level subject content

MAT 200, Midterm Exam Solution. a. (5 points) Compute the determinant of the matrix A =

Matrix Multiplication

6. Cholesky factorization

3 Orthogonal Vectors and Matrices

Sequences. A sequence is a list of numbers, or a pattern, which obeys a rule.

Excel Guide for Finite Mathematics and Applied Calculus

MATHEMATICS FOR ENGINEERING BASIC ALGEBRA

2.3. Finding polynomial functions. An Introduction:

Solutions to Math 51 First Exam January 29, 2015

Solving Simultaneous Equations and Matrices

CURVE FITTING LEAST SQUARES APPROXIMATION

[1] Diagonal factorization

Math 312 Homework 1 Solutions

Overview of Violations of the Basic Assumptions in the Classical Normal Linear Regression Model

Al-Jo anee Company: support department cost allocations with matrices to improve decision making

Eigenvalues, Eigenvectors, Matrix Factoring, and Principal Components

NOTES ON LINEAR TRANSFORMATIONS

A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Transcription:

EWE: Engineering With Excel Larsen Page 1 4. Matrix Operations in Excel. Matrix Manipulations: Vectors, Matrices, and Arrays. How Excel Handles Matrix Math. Basic Matrix Operations. Solving Systems of Linear Equations. Matrix Manipulations: Vectors, Matrices, and Arrays. In this section we consider the topic of Vectors, Matrices and Arrays and their application in solving Linear Equations and other linear algebra problems. Simultaneous linear equations occur frequently in engineering in such areas as heat conduction, molecular diffusion, fluid mechanics and in data regression. Excel s Solver feature will be used in a later chapter to solve more complicated linear and nonlinear systems of equations. Generally the term matrix (from mathematics) and array (from Excel) can be used interchangeably to refer to data organized in row and column fashion. Matrices consisting of a single row or a single column are called vectors. Even though the functions are named with matrix there is no help in Excel under matrix only array. Typical Linear Equation Set and Corresponding Matrices a 11 x 1 + a 12 x 2 +a 13 x 3 = b 1 a 21 x 1 + a 22 x 2 +a 23 x 3 = b 2 a 31 x 1 + a 32 x 2 +a 33 x 3 = b 3 a11 a12 a13 x1 b1 Where [A] = a21 a22 a23 [X] = x2 [B] = b2 a31 a32 a33 x3 b3 Is represented in math as [A][X] = [B] and has the solution [X] = [A] -1 [B] How Excel Handles Matrix Math. Matrix operations are handled in two different fashions in Excel. Addition of matrices and scalar multiplication are handled by conventional cell arithmetic (copying cell formulas) whereas advanced matrix operations such as transposition, multiplication and inversion are handled by matrix (array) functions.

EWE: Engineering With Excel Larsen Page 2 Key to understanding the use of matrix operations is the concept of the matrix (array) formula. Such a formula uses matrix functions and returns a result that can be a matrix, a vector, or a scalar, depending on the computations involved. Whatever the result may be, an area on the spreadsheet of precisely the correct size must be selected before the formula is typed in (otherwise you will either lose some of the answer or get added and possibly confusing information). After typing such a formula, you "enter" it with three keys pressed at once: CTRL, SHIFT and ENTER. This indicates that a matrix (array) result really is desired. It also designates the entire selected range as the desired location for the answer. To modify or delete the formula, select the entire region beforehand. When matrix computations are performed in this way, the "result areas" will be updated immediately whenever any of the numbers in the "input areas" change (unless automatic recomputation has been turned off). This can be a great help when one wishes to evaluate the effects of changes in assumptions, initial conditions, etc.. This feature, coupled with the ability to see matrices, complete with identification of the rows and columns (i.e. in the form that we have termed tables), will often make the spreadsheet environment the preferred choice for computation, if not for communication. Basic Matrix Operations. Matrix Addition : [C] = [A] + [B] Method 1: Corresponding elements will be added using cutting and pasting.

EWE: Engineering With Excel Larsen Page 3 Type the formula =B2+B6 in cell B10 and copy and paste into the cells in region B10:C12. Method 2: Matrix operator (+) will be used with named ranges. 1. CLEAR AREA C FIRST. Highlight and name the cells from B2:C4 as A. This is done by typing A in the name field of the function picker. 2. Similarly highlight and name the range B6:C8 as B. 3. Highlight the destination range and type the following formula: =A+B but do not press enter instead press control-shift-enter to complete the formula. This will introduce { } characters around the

EWE: Engineering With Excel Larsen Page 4 formula {=A+B} which indicate an array operation. YOU CANNOT SIMPLY TYPE THE BRACES. You should see the result in the area highlighted (in green above). Matrix Subtraction and Scalar Multiplication. You can use either of these methods to subtract (element by element) or multiply (all elements by the same value). For example: {=6*A} would produce a new array with all values in A multipled by 6. Multiplying Two Matrices. Matrix multiplication requires that the two matrices are conformable (that is, appropriate number of rows and columns. The number of columns in the first matrix must equal the number of rows in the second matrix. That is, you can multiple A(2,5)xB(5,3) because the inner numbers are the same. The size of the result is governed by the outer numbers, in this case (2,3). This should also suggest that AxB BxA since the result of AxB would be C(2,3) and the result of BxA is C(3,2). To multiply two matrices, use the MMULT function. =MMULT(first_matrix, second_matrix) Remember you must highlight the destination matrix BEFORE completing the formula with Shift-Control-Enter! Transposing A Matrices.

EWE: Engineering With Excel Larsen Page 5 The mathematical operation of transposing a matrix is simply to switch the rows with the columns. Hence, a row vector s transpose is a column vector and the transpose of a 2x3 matrix is a 3x2 matrix. To take the transpose of a matrix, use the TRANSPOSE function. Inverting A Matrices. The mathematical operation of inverting a matrix requires that two conditions are met: 1. The matrix must be square (same number of rows and columns) 2. The matrix must be nonsingular A matrix is singular is any of the following are true: 1. Any row or column contains all zeros 2. Any two rows or columns are identical 3. Any row or column is a linear combination of other rows or columns. To take the inverse of a matrix, use the MINVERSE function. Determinant Of A Matrix. The determinant of a matrix is a single value and is often encountered in solving systems of equations. Only square matrices have a determinant.

EWE: Engineering With Excel Larsen Page 6 Since the calculation of a determinant involves a significant number of calculations, it is subject to round-off error. When the determinant is essentially zero (that is, 1x10-14 or less) it can be considered zero. To find the determinant of a matrix, use the MDETERM function. Note, the last line is the same as the first line multiplied by -0.5. Solving Systems of Linear Equations. We now have the necessary tools to solve systems of linear equations. Here are the steps: 1. Write the equations in matrix form (coefficient matrix) x [unknown vector] = right hand side vector. [A][x] = [b]. 2. Invert the coefficient matrix [A] -1 3. Multiply both sides of the equation by the inverted coefficient matrix. This is the solution matrix. In the example below, the solution x is =MMULT([A] -1,[b])

EWE: Engineering With Excel Larsen Page 7