Matrix Commands in Excel Anthony Murphy Nuffield College

Slides:



Advertisements
Similar presentations
(MICROSOFT EXCEL). Is a spreadsheet application designed to take advantage of the windows graphical interface MICROSOFT EXCEL.
Advertisements

2.3 Modeling Real World Data with Matrices
Tier 2: Case Studies. Table of Contents Chapter 1 Introduction Useful Computer Tools for Data Reconciliation Chapter 2 Case Study #1 Steady-State Nonlinear.
3_3 An Useful Overview of Matrix Algebra
MF-852 Financial Econometrics
Maths for Computer Graphics
Chapter 2 Basic Linear Algebra
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 12 System of Linear Equations.
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.
Part 3 Chapter 8 Linear Algebraic Equations and Matrices PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The.
Linear Simultaneous Equations
Pam Perlich Urban Planning 5/6020
Matrix Mathematics in MATLAB and Excel
Special Topic: Matrix Algebra and the ANOVA Matrix properties Types of matrices Matrix operations Matrix algebra in Excel Regression using matrices ANOVA.
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,
Intro to Matrices Don’t be scared….
Solving Simultaneous Equations by Matrix Inverse Problem 2.5 # 37 Presented by E. G. Gascon.
Copyright © Cengage Learning. All rights reserved. 7.6 The Inverse of a Square Matrix.
3.8 Matrices.
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.
Row 1 Row 2 Row 3 Row m Column 1Column 2Column 3 Column 4.
Portfolio Statistics  Portfolio Expected Return: E(r p ) = w T r  Portfolio Variance:  2 p = w T  w  Sum of portfolio weights: = w T 1 –where w is.
Computer Programming (TKK-2144) 13/14 Semester 1 Instructor: Rama Oktavian Office Hr.: M.13-15, W Th , F
Chapter 10 Review: Matrix Algebra
ECON 1150 Matrix Operations Special Matrices
Matlab tutorial course Lesson 2: Arrays and data types
Array Math.
Excel 2010 Formulas A formula is an equation that performs a calculation. Like a calculator, Excel can execute formulas that add, subtract, multiply, and.
Matrix Entry or element Rows, columns Dimensions Matrix Addition/Subtraction Scalar Multiplication.
The Theory of the Simplex Method
Matrix Determinants and Inverses
Lecture 28: Mathematical Insight and Engineering.
Using Microsoft Excel Built-in Functions and Matrix Operations.
ES 240: Scientific and Engineering Computation. Chapter 8 Chapter 8: Linear Algebraic Equations and Matrices Uchechukwu Ofoegbu Temple University.
ME 142 Engineering Computation I Matrix Operations in Excel.
Special Topic: Matrix Algebra and the ANOVA Matrix properties Types of matrices Matrix operations Matrix algebra in Excel Regression using matrices ANOVA.
ME 142 Engineering Computation I Matrix Operations in Excel.
INTRODUCTION TO MATLAB DAVID COOPER SUMMER Course Layout SundayMondayTuesdayWednesdayThursdayFridaySaturday 67 Intro 89 Scripts 1011 Work
EXAMPLE 1 Add and subtract matrices
Matrices and Determinants
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.
Mathematical Formulas and Excel
Linear System of Simultaneous Equations Warm UP First precinct: 6 arrests last week equally divided between felonies and misdemeanors. Second precinct:
Chapter 4 Matrices. In Chapter 4, You Will… Move from using matrices in organizing data to manipulating matrices through data. Learn to represent real-world.
Precalculus Section 14.1 Add and subtract matrices Often a set of data is arranged in a table form A matrix is a rectangular.
Matrices Presentation by : Miss Matkar Pallavi. P.
Matrices. Matrix - a rectangular array of variables or constants in horizontal rows and vertical columns enclosed in brackets. Element - each value in.
Matrix Algebra Basics Chapter 3 Section 5. Algebra.
Matrix Algebra Definitions Operations Matrix algebra is a means of making calculations upon arrays of numbers (or data). Most data sets are matrix-type.
Ch. 12 Vocabulary 1.) matrix 2.) element 3.) scalar 4.) scalar multiplication.
Section 6-2: Matrix Multiplication, Inverses and Determinants There are three basic matrix operations. 1.Matrix Addition 2.Scalar Multiplication 3.Matrix.
MTH108 Business Math I Lecture 20.
MAT 322: LINEAR ALGEBRA.
AGB 260: Agribusiness Data Literacy
CGN 2420 Matrix Operations in Excel
Linear Algebra review (optional)
Linear Algebra Lecture 2.
Chapter 7 Matrix Mathematics
Matrices and Matrix Solutions
Algebra substitution.
Dr Huw Owens Room B44 Sackville Street Building Telephone Number 65891
Tier 2: Case Studies If you need narration for this, you’re in the wrong profession.
Method 1: Substitution methods
Matrices.
BUSINESS MATHEMATICS & STATISTICS.
Matrix Operations Ms. Olifer.
3.5 Perform Basic Matrix Operations Algebra II.
Presentation transcript:

Matrix Commands in Excel Anthony Murphy Nuffield College

Matrix Commands in Excel Excel can perform some useful, albeit basic, matrix operations: Addition & subtraction; Scalar multiplication & division; Transpose (TRANSPOSE); Matrix multiplication (MMULT); Matrix inverse (MINVERSE); Determinant of matrix (MDETERM); As well as combinations of these operations.

Matrix Commands in Excel (Cont’d) In Excel the matrix commands (and some other commands) are called ARRAY commands. Can perform more complicated operations using free add-ins for Excel e.g. MATRIX. Alternatively, can use matrix package like MATLAB (which also does symbolic maths & matrix algebra).

Excel (Cont’d) The matrix commands in Excel are sufficient for this course. If you are really keen, you can play around with Visual Basic for Applications (VBA), the Excel programming language. For example, see Benninga, S. (2000), Financial Modelling, MIT Press.

Named Cells Most Excel formulae require you to name one or more cell ranges e.g. b2.c4. You can type these in directly or select them using the mouse. However, it is often better to use a named range. To assign a name to a range of cells, highlight it using the mouse and choose Insert ►Name ► Define and enter a name. Choose a useful name. Remember Excel does not distinguish between the names PRICE, Price and price.

Entering a Matrix Choose a location for the matrix (or vector) and enter the elements of the matrix. Highlight the cells of the matrix and choose INSERT ► NAME ► DEFINE. Enter a name for the matrix. You can now use the name of the matrix in formulae.

Addition, Subtraction and Scalar Multiplication Etc. To add two named 3 x 2 matrices A and B: Highlight a blank 3 x 2 results area in the spreadsheet. (If the results area is too small, you will get the wrong answer.) Type =A+B in the formula bar and press the CTRL, SHIFT and ENTER keys simultaneously. You must use the CTRL, SHIFT,ENTER keys if you want to perform a matrix computation. (If you don’t do this, you will get an error message or the wrong answer.)

Addition, Subtraction and Scalar Multiplication Etc. (Cont’d) If you click on any cell in the result, the formula {=A+B} will be displayed. In Excel, the { } brackets indicate a matrix (array) command. For an example of scalar multiplication, see the Example Spreadsheet on the web page.

Matrix Transpose Suppose A is a 3 x 2 matrix. The transpose of A, A’, will be 2 x 3. Select a 2 x 3 results area, type =TRANSPOSE(A) in the formula bar and press CTRL, SHIFT, ENTER. Exercise: Choose A and B so that AB exists. Check that (AB)' = B 'A‘ using MMULT (matrix multiplication). What do you think (ABC)' is equal to?

Matrix Multiplication Suppose A and B are named 3 x 2 and 2 x 3 matrices. Then AB is 3 x 3 and BA is 2 x 2. This illustrates the fact that, in general, AB is not equal to BA, even if the matrices are conformable. Select a blank 3 x 3 area for the result AB. Type =MMULT(A,B) in the formula bar and press CTRL, SHIFT, ENTER to generate AB.

Matrix Inverse Suppose B is a square 2 x2 matrix. Select a 2 x 2 area for the inverse of B. Type =MINVERSE(B) in the formula bar and press CRTL, SHIFT, ENTER. If B is singular (non-invertible), you will get an error message. Suppose A and B have the same dimension and are both invertible. Show that (AB) -1 = B -1 A -1. What do you think (ABC) -1 is equal to?

Matrix Determinant Suppose A is a square matrix. The determinant of A, det(A) or IAI, is a scalar. Select a single cell, type = MDETERM(A) in the formula area and press CTRL, SHIFT, ENTER (or just ENTER). If A is singular, then det(A) = 0. Exercise: Check that det(AB) = det(BA) = det(A).det(B), where A and B are square matrices.