Presentation is loading. Please wait.

Presentation is loading. Please wait.

ME 142 Engineering Computation I Matrix Operations in Excel.

Similar presentations


Presentation on theme: "ME 142 Engineering Computation I Matrix Operations in Excel."— Presentation transcript:

1 ME 142 Engineering Computation I Matrix Operations in Excel

2 Key Concepts Matrix Basics Matrix Addition Matrix Multiplication Transposing a Matrix Inverting a Matrix The Determinant of a Matrix Matrix Inversion Method Cramer’s Rule

3 Matrix Basics  What is a Matrix? A matrix may be defined as a collection of numbers, arranged into rows and columns

4 Matrix Basics  Named cells may be used to define arrays Simplifies process Makes formulas easier to understand  Pre-select the array output area  Use [Shift]+[Ctrl]+[Enter] key combination to execute array commands Populates each cell in array output area with array command

5 Matrix Addition  The 2 matrices to be added must be the same size  Matrices are added element by element

6 Matrix Addition =A+B [Shift]+[Cntl]+[Enter]

7 Matrix Multiplication  In order to multiply 2 matrices, the number of columns in the first matrix must equal the number of rows in the second matrix  Elements in the results matrix are obtained by performing a product-sum of each row in the first matrix by each column in the second matrix

8 Matrix Multiplication  Row1,col1: 1*1 + 4*(-1) +5*3 = 12  Row1,col2: 1*5 + 4*4 + 5*2 = 31  Row2,col1: 8*1 + 3*(-1) + 2*3 = 11  Row2,col2: 8*5 + 3*4 + 2*2 = 56

9 Matrix Multiplication: AxB =MMULT(A,B) [Shift]+[Cntl]+[Enter]

10 Matrix Multiplication: BxA =MMULT(B,A) [Shift]+[Cntl]+[Enter]

11 Transposing a Matrix =TRANSPOSE(A) [Shift]+[Cntl]+[Enter]  To transposing a matrix simply switch the rows and columns  Any matrix can be transposed

12 Inverting a Matrix  A matrix multiplied by its inverse matrix results in the identity matrix  The inverse of a matrix can be useful in solving simultaneous equations  Only square matrices (equal number of rows and columns) are possible to invert  Not all square matrices can actually be inverted 3x3 Identity Matrix

13 Inverting a Matrix

14 =MINVERSE(D) [Shift]+[Cntl]+[Enter]

15 Determinant of a Matrix  The determinant of a matrix is a single value, calculated by performing a product-sum on the rows and columns in a matrix  The determinant of a matrix can be useful in solving simultaneous equations  Only square matrices (equal number of rows and columns) have a determinant

16 Determinant of a Matrix =MDETERM(D) Determinant = 211  Recopy first 2 columns  Multiply and sum diagonals to the right  Multiply and sum diagonals to the left  Difference of sum is determinant (2*2*6 + 3*4*8 + 5*7*11) – (5*2*8 + 2*4*11 + 3*7*6)

17 Matrix Inversion Method Given linear system of equations in matrix form: Where Then multiplying both sides by [A -1 ], the inversion of [A]

18 Cramer’s Rule  This rule states that each unknown in a system of linear equations may be expressed as a fraction of two determinants. The determinant of the denominator, D, is obtained from the coefficients of matrix [A] The determinant of the numerator is obtained from D by replacing the column of coefficients of the unknown in question by the coefficients of matrix [B]

19 Cramer’s Rule Given linear system of equations in matrix form: Where

20 Cramer’s Rule Then the determinant of [A] may be defined as: And values of [X] may be found from the expressions below:

21 Cramer’s Rule  Useful in solving systems of 2 or 3 linear equations, by hand or by computer


Download ppt "ME 142 Engineering Computation I Matrix Operations in Excel."

Similar presentations


Ads by Google