Page 108 - Thermodynamics of Biochemical Reactions
P. 108

5.6 Operations of  Linear  Algebra   103


         H  5.6  OPERATIONS OF LINEAR ALGEBRA

         Although  matrix  multiplications, row  reductions, and calculation  of  null  spaces
         can  be  done by  hand  for  small  matrices,  a  computer with  programs  for  linear
         algebra  are  needed  for  large  matrices.  Mathematica is  very  convenient  for  this
         purpose. More information about the operations of linear algebra can be obtained
         from  textbooks  (Strang,  1988), but  this  section  provides  a  brief  introduction to
         making calculations  with  Mathematica  (Wolfram, 1999).
            Matrix multiplication. The first dimension  of  a matrix is the number of  rows,
         and  the  second  dimension  of  a  matrix  is  the  number  of  columns.  In  order  to
         multiply matrix b by matrix a, it is necessary that the second dimension of matrix
         a  be  the  same  as the  first  dimension  of  matrix  b. The product  ah  has  the  first
         dimension  of  a  and  the  second  dimension  of  6. In Mathematica  this  product is
         calculated  by putting  a period  between a and h or by using Dot[a, b].

             Gaussian reduction. The rows  of  a  matrix  can  be multiplied  by  integers and
         be added and subtracted to produce zero elements. This can be done to obtain
         the matrix  in row-reduced  canonical form in which  there is a identity matrix  on
         the  left.  An  identity  matrix  is  a  square  matrix  of  zeros  with  ones  along  the
         diagonal.  In  Mathematicu  the  row-reduced  canonical  form  of  a  is  obtained by
         using RowReduce[a].  If, after row reduction, one of the rows is made up of zeros,
         one of  the rows is not independent, and should be deleted. If  two matrices  have
         the  same  row-reduced  form, they  are equivalent.  We  say  that  a  matrix  is  not
         unique because it can be written  in different forms that are equivalent.
             Null space. If  the product of two matrices is a zero matrix (all zeros), ax = 0
         is said to be  a homogeneous  equation. The matrix  x is said to be  the null  space
         of  a. In  Muthematica  a basis  for  the null  space of  a can be calculated  by  use  of
         NullSpace[a].  There  is  a  degree  of  arbitrariness  in  the  null  space  in  that  it
         provides  a  basis,  and  alternative  forms  can  be  calculated  from  it,  that  are
         equivalent. See Equation 5.1-19 for a method to calculate a basis for the null space
         by hand. When  a basis for the null space of  a matrix needs to be compared  with
         another matrix  of  the  same dimensions,  they  are both  row  reduced.  If  the two
         matrices have the same row-reduced  form, they  are equivalent.
             Solution of  linear equations. A set of linear equations is represented by ax = b.
         The  solution  x  can  be  obtained  in  Muthematicu  by  use  of  LinearSolve[a,b].
         Matrix a can be square or rectangular.
             Transposition. In Mathematica the Transpose[a]  transposes the first two levels
         of a. Equations 5.1-14 and 5.1-23 give a matrix and its transpose.
             Pansformation matrix. When the conservation matrix a for a system is written
         in terms of elemental compositions, the elements are used as components. But we
         can  change  the  choice  of  components  (change  the  basis)  by  making  a  matrix
         multiplication  that does not change the row-reduced  form  of  the a matrix  or its
         null  space.  Since  components  are  really  coordinates,  we  can  shift  to  a  new
         coordinate system  by  multiplying  by  the  inverse  of  the  transformation  matrix
         between  the  two  coordinate systems. A new choice of  components  can be made
         by  use of  a component transformation  matrix m, which  gives the composition  of
         the  new  components  (columns)  in  terms  of  the  old  components  (rows).  The
         following  matrix  multiplication  yields  a  new  a  matrix  in  terms  of  the  new
         components.
                                   a(new) = m- 'a(o1d)                   (5.5-1)
         The inverse of the transformation  matrix m is represented  by m-'. In Mathemat-
         ica, the inverse of m is calculated  with Inverse[m].
   103   104   105   106   107   108   109   110   111   112   113