Page 84 - Excel for Scientists and Engineers: Numerical Methods
P. 84

CHAPTER 3                     MATRICES                                61


                   Do not type the braces; if you do, the result will not be recognized by Excel
                as a formula.








                                     Figure 3-2.  Result matrix {A + 3).
                   (folder 'Chapter 03 (Matrices) Examples, workbook 'Matrix Math', sheet 'Sheet 1')


                   Subtraction of a constant, multiplication or division by a constant, or addition
                of two matrices is performed  in the same way by using standard Excel algebraic
                operators.
                Scalar  Multiplication.  Scalar multiplication  can be either multiplication of
                the  elements  of  a  matrix  by  a  constant,  e.g.,  a  formula  such  as  {=3*A},  or
                multiplication  of  corresponding  elements  of  two  matrices,  e.g.,  {=A*B}.  The
                result of the latter formula is shown in Figure 3-3.








                                     Figure 3-3.  Result matrix {A x B} .
                   (folder 'Chapter 03 (Matrices) Examples, workbook 'Matrix Math', sheet 'Sheet 1 ')

                   Matrix  multiplication  can  be  accomplished  easily  by  the  use  of  Excel's
                worksheet  function  MMULT(mafrix7,  mafrix2).  For  the  matrices  A  and  B
                defined  above,  entering the  formula =MMULT(A,B) yields  the  result  shown  in
                Figure  3-4  while  the formula  =MMULT(B,A) yields the  result  shown  in  Figure
                3-5.









                                       Figure 3-4.  Result matrix A.B.
                   (folder 'Chapter 03 (Matrices) Examples, workbook 'Matrix Math', sheet 'Sheet 1 ')
   79   80   81   82   83   84   85   86   87   88   89