Page 27 - Computational Colour Science Using MATLAB
P. 27

14                  LINEAR ALGEBRA FOR BEGINNERS


                              0    2
                                      .
                              3    3
                    A   B ¼
               If A is an m r matrix and B is an r n matrix, then the product AB is the m n
               matrix whose entries are determined as follows. To find the entry in row i and
               column j of AB, single out row i from matrix A and column j from matrix B,
               multiply the corresponding entries from the row and column together and then
               add up the resulting products. Thus

                           1  2
                                .
                           3  4
                    AB ¼
               In order to see how the entries were created in AB, note that for the (i, j) entry
               where i ¼ j ¼ 1, we took the values 1 and 0 from the first row of A and the values
               1 and 4 from the first column of B to yield (1)(1)+(0)(3) ¼ 1. Note that
               multiplying matrix B by A resulted in matrix AB, which was the same as B. This
               special situation occurred because matrix A is the identity matrix. We can
               therefore note that multiplying a matrix by the identity matrix is like multiplying
               a scalar by unity. It should also be clear that a matrix A may only be multiplied
               by a matrix B if the number of columns in A is equal to the number of rows in B.




               2.2 Solving systems of simultaneous equations

               Imagine that we wish to solve a problem where we need to find the values of two
               variables, x and y, and we are given knowledge of two relationships between the
               two variables. For example, we might be told that the sum of the two variables is
               6 and the difference between the two is 3. We can represent this problem by a pair
               of simultaneous equations:
                    6 ¼ x þ y,
                    3 ¼ x   y.                                                    ð2:1Þ
               Many readers will be familiar with this sort of problem and will possess the
               algebraic skills to rearrange these two equations into a form that enables one of
               the variables to be eliminated. In this trivial example, we can simply add the two
               equations together to give

                    9 ¼ 2x,
               from which it is now obvious that x ¼ 4.5 and (by subsequent substitution) that
               y ¼ 1.5.
                 However, it is often convenient to represent the problem in matrix form. The
               two simultaneous (or coupled) linear equations can be written as a single matrix
               equation of the form
   22   23   24   25   26   27   28   29   30   31   32