Page 19 - Numerical Methods for Chemical Engineering
P. 19

8       1 Linear algebra



                   Matrix dimension
                   For a linear system Ax = b,
                                                                       
                               a 11  a 12  ...  a 1N        x 1           b 1
                                        ...
                               a 21  a 22    a 2N           x 2           b 2
                                                                       
                         A =  .     .                                           (1.42)
                             
                              . .   . .      .      x =  .      b =  . 
                                              .
                                                             .
                                                                          .
                                                                         . 
                                              . 
                                                           . 
                              a N1  a N2  ... a NN          x N           b N
                   to have a unique solution, there must be as many equations as unknowns, and so typically
                   A will have an equal number N of columns and rows and thus be a square matrix. A matrix
                   is said to be of dimension M × N if it has M rows and N columns. We now consider some
                   simple matrix operations.
                   Multiplication of an M × N matrix A by a scalar c
                                                                          
                                a 11  a 12  ...  a 1N   ca 11  ca 12  ...  ca 1N
                                          ...                       ...
                                a 21  a 22    a 2N      ca 21  ca 22     ca 2N
                                                                          
                              
                       cA = c  .     .                 .     .         .          (1.43)
                               . .   . .       .  =    . .   . .       . .  
                                                .
                                                      
                                                . 
                                                                             
                               a M1  a M2  ... a MN     ca M1  ca M2  ... ca MN
                   Addition of an M × N matrix A with an equal-sized M × N matrix B
                                                              
                                a 11  ...  a 1N     b 11  ...  b 1N
                                a 21  ...  a 2N      b 21  ...  b 2N  
                                                  
                                              
                               .          .  +  .             
                              
                               . .        . .    . .        . 
                                                               .
                                                               . 
                                a M1  ... a MN      b M1  ... b MN
                                                                            
                                                     a 11 + b 11  ...  a 1N + b 1N
                                                     a 21 + b 21    a 2N + b 2N
                                                              ...           
                                                                            
                                                        .               .             (1.44)
                                                        .               .
                                                =                           
                                                       .               .    
                                                    a M1 + b M1  ... a MN + b MN
                   Note that A + B = B + A and that two matrices can be added only if both the number of
                   rows and the number of columns are equal for each matrix. Also, c(A + B) = cA + cB.
                   Multiplication of a square N × N matrix A with an N-dimensional
                   vector v
                   This operation must be defined as follows if we are to have equivalence between the coef-
                   ficient and matrix/vector representations of a linear system:
                                                                                
                              a 11  a 12  ...  a 1N  v 1    a 11 v 1 + a 12 v 2 + ··· + a 1N v N
                              a 21  a 22    a 2N   v 2      a 21 v 1 + a 22 v 2 + ··· + a 2N v N
                                       ...                                      
                            
                       Av =  .     .                               .            
                             . .   . .      .   .  =               . .          
                                             .
                                                    .
                                                                                     
                                                          
                                             .   . 
                              a N1  a N2  ... a NN  v N     a N1 v 1 + a N2 v 2 +· · · + a NN v N
                                                                                      (1.45)
   14   15   16   17   18   19   20   21   22   23   24