<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE document PUBLIC "-//CNX//DTD CNXML 0.5 plus MathML//EN" "http://cnx.rice.edu/cnxml/0.5/DTD/cnxml_mathml.dtd">
<document xmlns="http://cnx.rice.edu/cnxml" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:bib="http://bibtexml.sf.net/" xmlns:md="http://cnx.rice.edu/mdml/0.4" id="m10145"> 

  <name>Matrix Methods for Electrical Systems</name> 

  <metadata>
  <md:version>2.6</md:version>
  <md:created>2001/06/27</md:created>
  <md:revised>2004/08/10 09:06:30.936 GMT-5</md:revised>
  <md:authorlist>
      <md:author id="rainking">
      <md:firstname>Doug</md:firstname>
      
      <md:surname>Daniels</md:surname>
      <md:email>rainking@alumni.rice.edu</md:email>
    </md:author>
  </md:authorlist>

  <md:maintainerlist>
    <md:maintainer id="rainking">
      <md:firstname>Doug</md:firstname>
      
      <md:surname>Daniels</md:surname>
      <md:email>rainking@alumni.rice.edu</md:email>
    </md:maintainer>
    <md:maintainer id="brentmh">
      <md:firstname>Brent</md:firstname>
      <md:othername>Michael</md:othername>
      <md:surname>Hendricks</md:surname>
      <md:email>brentmh@rice.edu</md:email>
    </md:maintainer>
  </md:maintainerlist>
  
  <md:keywordlist>
    <md:keyword>nerve fiber</md:keyword>
    <md:keyword>axial current</md:keyword>
    <md:keyword>membrane current</md:keyword>
    <md:keyword>exogeneous disturbance</md:keyword>
    <md:keyword>Strang Quartet</md:keyword>
    <md:keyword>adjacency matrix</md:keyword>
    <md:keyword>Ohm's Law</md:keyword>
    <md:keyword>Kirchhoff's Current Law</md:keyword>
    <md:keyword>kcl</md:keyword>
    <md:keyword>Nernst potentials</md:keyword>
  </md:keywordlist>

  <md:abstract>This module introduces matrix algebra as a tool for solving multivariable problems.  Setting up a model for a nerve cell, we use matrices to simply express the electrical properties of the nerve cell, and utilize matrix algebra to solve for the potential differences across nodes and axial and membrane current.  By working several examples, we also introduce and reinforce a general  problem modeling methodology, and demonstrate the usefulness of matrix algebra for realizing a solution to these problems.</md:abstract>
</metadata>

  <content>
  <section id="section1">
    <name>Nerve Fibers and the Strang Quartet</name>
    <para id="p1">
      We wish to confirm, by example, the prefatory claim that matrix
      algebra is a useful means of organizing (stating and solving)
      multivariable problems.  In our first such example we
      investigate the response of a nerve fiber to a constant current
      stimulus. Ideally, a nerve fiber is simply a cylinder of radius
      <m:math><m:ci>a</m:ci></m:math> and length
      <m:math><m:ci>l</m:ci></m:math> that conducts electricity both
      along its length and across its lateral membrane. Though we
      shall, in subsequent chapters, delve more deeply into the
      biophysics, here, in our first outing, we shall stick to its
      purely resistive properties. The latter are expressed via two
      quantities:

      <list id="resistivity" type="enumerated">
	<item id="cytoplasm_resist">
	  <m:math display="inline">
	    <m:ci><m:msub>
		<m:mi>ρ</m:mi>
		<m:mi>i</m:mi>
	    </m:msub></m:ci>
	  </m:math>,
	  <!-- rho_i -->
	  
	  the resistivity in 
	  <m:math display="inline">
	    <m:mrow><m:mi>Ω</m:mi>
	    <m:mtext>cm</m:mtext></m:mrow>
	  </m:math>
	  <!-- Omega cm -->
	  
	  of the cytoplasm that fills the cell, and 
	</item>
	<item id="cell_membrane_resist">
	  <m:math display="inline">
	    <m:ci><m:msub>
		<m:mi>ρ</m:mi>
		<m:mi>m</m:mi>
	      </m:msub></m:ci>
	  </m:math>,
	  <!-- rho_m -->
	  
	  the resistivity in 
	  
	  <m:math display="inline">
	    <m:mrow><m:mi>Ω</m:mi>
	    <m:msup>
		<m:mtext>cm</m:mtext>
		<m:mn>2</m:mn>
	      </m:msup></m:mrow>
	  </m:math>
	  <!-- Omega cm^2 -->
	  
	  of the cell's lateral membrane.
	</item>
      </list>
    </para>
    
    <figure id="three_compart_nerve">
      <name>A 3 compartment model of a nerve cell</name>
      <media type="image/png" src="cell.png"/>
    </figure>

    <para id="p2">
      Although current surely varies from point to point along the
      fiber it is hoped that these variations are regular enough to be
      captured by a multicompartment model. By that we mean that we
      choose a number <m:math><m:ci>N</m:ci></m:math> and divide the
      fiber into <m:math><m:ci>N</m:ci></m:math> segments each of
      length

      <m:math display="inline">
	<m:apply><m:divide/>
	  <m:ci>l</m:ci>
	  <m:ci>N</m:ci>
	</m:apply>
      </m:math>.
      <!-- l/N -->

      Denoting a segment's 
      <definition id="axial_resistance">
	<term>axial resistance </term>
	<meaning>
	  <m:math display="block">
	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>i</m:mi>
		</m:msub></m:ci>
	      <m:apply><m:divide/>
		<m:apply><m:times/>
		  <m:ci><m:msub>
		      <m:mi>ρ</m:mi>
		      <m:mi>i</m:mi>
		    </m:msub></m:ci>
		  <m:apply><m:divide/>
		    <m:ci>l</m:ci>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
		<m:apply><m:times/>
		  <m:pi/>
		  <m:apply><m:power/>
		    <m:ci>a</m:ci>
		    <m:cn>2</m:cn>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  <!-- R_i = ( p_i * l/N ) / ( pi * a^2 ) -->
	</meaning>
      </definition>

      and

      <definition id="membrane_resistance">
	<term>membrane resistance</term>
	<meaning>
	  <m:math display="block">
	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>m</m:mi>
		</m:msub></m:ci>
	      <m:apply><m:divide/>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mi>m</m:mi>
		  </m:msub></m:ci>
		<m:apply><m:times/>
		  <m:cn>2</m:cn>
		  <m:pi/>
		  <m:ci>a</m:ci>
		  <m:apply><m:divide/>
		    <m:ci>l</m:ci>
		    <m:ci>N</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  <!-- R_m = p_m / ( 2 * pi * a * ( l / N ) ) -->
	</meaning>
      </definition>

      we arrive at the lumped circuit model of <cnxn target="three_compart_nerve" strength="9"/>.  For a fiber in
      culture we may assume a constant extracellular potential,
      <foreign>e.g.</foreign>, zero. We accomplish this by connecting
      and grounding the extracellular nodes, see <cnxn target="unfinished_circuit_model" strength="9"/>.
    </para>

    <figure id="unfinished_circuit_model">
      <name>A rudimentary circuit model</name>
      <media type="image/png" src="cell2.png"/>
    </figure>
      
    <para id="p3">
      <cnxn target="unfinished_circuit_model" strength="9"/> also
      incorporates the <term>exogenous disturbance</term>, a current
      stimulus between ground and the left end of the fiber. Our
      immediate goal is to compute the resulting currents through each
      resistor and the potential at each of the nodes. Our long--range
      goal is to provide a modeling methodology that can be used
      across the engineering and science disciplines. As an aid to
      computing the desired quantities we give them names. With
      respect to <cnxn target="fully_dressed_circuit" strength="9"/>,
      we label the vector of potentials
      
      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci>x</m:ci>
	  <m:matrix>
	    <m:matrixrow>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>1</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>2</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>4</m:mn>
		</m:msub></m:ci>
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
      </m:math>
      <!-- x = [ x_1, x_2, x_3, x_4 ] -->
      
      and the vector of currents

       <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci>y</m:ci>
	  <m:matrix>
	    <m:matrixrow>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>1</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>2</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>4</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>5</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>6</m:mn>
		</m:msub></m:ci>
	    </m:matrixrow>
	  </m:matrix>
	</m:apply>
	<m:mtext>.</m:mtext>
      </m:math>
      <!-- y = [ y_1, y_2, y_3, y_4, y_5, y_6] -->
      
      We have also (arbitrarily) assigned directions to the currents
      as a graphical aid in the consistent application of the basic
      circuit laws.
    </para>
    
    <figure id="fully_dressed_circuit">
      <name>The fully dressed circuit model</name>
      <media type="image/png" src="cell3.png"/>
    </figure>

    <para id="p4">
      We incorporate the circuit laws in a modeling methodology that
      takes the form of a <cite src="#strang"><term>Strang
      Quartet</term></cite>:
      <list id="strang_quartet" type="bulleted">

	<item id="voltage_drop">
	  (S1)  Express the voltage drops via
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:ci type="vector">e</m:ci>
	      <m:apply><m:minus/>
		<m:apply><m:times/>
		  <m:ci type="matrix">A</m:ci>
		  <m:ci type="vector">x</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>.
	  <!-- e = -Ax -->
	</item>
	
	<item id="ohms_law">
	  (S2)  Express <term>Ohm's Law</term> via
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:ci type="vector">y</m:ci>
	      <m:apply><m:times/>
		<m:ci type="matrix">G</m:ci>
		<m:ci type="vector">e</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>.
	  <!-- y = Ge --> 
	</item>

	<item id="kcl">
	  (S3)  Express <term>Kirchhoff's Current Law</term> via 
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:apply><m:times/>
		<m:apply><m:transpose/>
		  <m:ci type="matrix">A</m:ci>
		</m:apply>
		<m:ci type="vector">y</m:ci>
	      </m:apply>
	      <m:apply><m:minus/>
		<m:ci type="vector">f</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>.
	  <!-- A'y = -f -->
	</item>

	<item id="combined_rule">
	  (S4)  Combine the above into
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:apply><m:times/>
		<m:apply><m:transpose/>
		  <m:ci type="matrix">A</m:ci>
		</m:apply>
		<m:ci type="matrix">G</m:ci>
		<m:ci type="matrix">A</m:ci>
		<m:ci type="vector">x</m:ci>
	      </m:apply>
	      <m:ci type="vector">f</m:ci>
	    </m:apply>
	  </m:math>.
	  <!-- A'GAx = f -->
	</item>
      </list>
    </para>

    <para id="p5">
      The <m:math><m:ci type="matrix">A</m:ci></m:math> in (S1) is the
      <term>node-edge adjacency matrix</term> -- it encodes the
      network's connectivity. The <m:math><m:ci type="matrix">G</m:ci></m:math> in (S2) is the diagonal matrix
      of edge conductances -- it encodes the physics of the
      network. The <m:math><m:ci type="vector">f</m:ci></m:math> in
      (S3) is the vector of current sources -- it encodes the
      network's stimuli. The culminating
      <m:math display="inline">
	<m:apply><m:times/>
	  <m:apply><m:transpose/>
	    <m:ci type="matrix">A</m:ci>
	  </m:apply>
	  <m:ci type="matrix">G</m:ci>
	  <m:ci type="matrix">A</m:ci>
	</m:apply>
      </m:math>
      <!-- A'GA --> in (S4) is the symmetric matrix whose inverse,
      when applied to <m:math><m:ci type="vector">f</m:ci></m:math>,
      reveals the vector of potentials, <m:math><m:ci type="vector">x</m:ci></m:math>.  In order to make these ideas
      our own we must work many, many examples.
    </para>
  </section>

  <section id="example_1">
    <name>Example</name>
    <section id="step1">
      <name>Strang Quartet, Step 1</name>
      <para id="p6">
	With respect to the circuit of <cnxn target="fully_dressed_circuit" strength="9"/>, in accordance
	with step <cnxn target="voltage_drop" strength="9">(S1)</cnxn>, we express the six potential
	differences (always tail minus head)
	
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>1</m:mn>
	      </m:msub></m:ci>
	    <m:apply><m:minus/>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>1</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>2</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	<!-- e_1 = x_1 - x_2 -->
	
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>2</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>2</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:math>
	<!-- e_2 = x_2 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>3</m:mn>
	      </m:msub></m:ci>
	    <m:apply><m:minus/>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>2</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	<!-- e_3 = x_2 - x_3 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>4</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>3</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:math>
	<!-- e_4 = x_3 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>5</m:mn>
	      </m:msub></m:ci>
	    <m:apply><m:minus/>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>x</m:mi>
		  <m:mn>4</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	<!-- e_5 = x_3 - x_4 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci><m:msub>
		<m:mi>e</m:mi>
		<m:mn>6</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>4</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:math>
	<!-- e_6 = x_4 -->

	Such long, tedious lists cry out for matrix representation, to wit
	
	<m:math display="inline">
	  <m:apply><m:eq/>
	    <m:ci type="vector">e</m:ci>
	    <m:apply><m:minus/>
	      <m:apply><m:times/>
		<m:ci type="matrix">A</m:ci>
		<m:ci type="vector">x</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:math>
	<!-- e = -Ax -->

	where
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci type="matrix">A</m:ci>
	    <m:matrix>
	      <m:matrixrow><m:cn>-1</m:cn><m:cn>1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>1</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>1</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn>
	      </m:matrixrow>
	    </m:matrix>
	  </m:apply>
	</m:math>
	<!-- A = [ -1  1  0  0
                    0 -1  0  0
                    0 -1  1  0
                    0  0 -1  0
                    0  0 -1  1
                    0  0  0 -1 ] -->
      </para>
    </section>

    <section id="step2">
      <name>Strang Quartet, Step 2</name>
      <para id="p7">
	<cnxn target="ohms_law" strength="9">Step (S2)</cnxn>, Ohm's
	Law, states:
	
	<rule id="ohm_defn" type="law">
	  <name>Ohm's Law</name>
	  <statement>
	    <para id="rulep1">
	      The current along an edge is equal to the potential drop
	      across the edge divided by the resistance of the edge.
	    </para>
	  </statement>
	</rule>
	
	In our case,
	<m:math display="block">
	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mi>j</m:mi>
		</m:msub></m:ci>
	      <m:apply><m:divide/>
		<m:ci><m:msub>
		    <m:mi>e</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>i</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	    <!-- y_j = e_j / R_i -->
	    
	    <m:mrow><m:mtext>,  </m:mtext></m:mrow>

	    <m:apply><m:eq/>
	      <m:ci>j</m:ci>
	      <m:mrow><m:mn>1</m:mn>
		<m:mo>,</m:mo>
		<m:mn>3</m:mn>
		<m:mo>,</m:mo>
		<m:mn>5</m:mn>
	      </m:mrow>
	    </m:apply>
	    <!-- j = 1,3,5 -->
	    
	    <m:mtext>  and  </m:mtext>
	    
	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mi>j</m:mi>
		</m:msub></m:ci>
	      <m:apply><m:divide/>
		<m:ci><m:msub>
		    <m:mi>e</m:mi>
		    <m:mi>j</m:mi>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>R</m:mi>
		    <m:mi>m</m:mi>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	    <!-- y_j = e_j / R_m -->
	    
	    <m:mtext>,  </m:mtext>
	    
	    <m:apply><m:eq/>
	      <m:ci>j</m:ci>
	      <m:mrow><m:mn>2</m:mn>
		<m:mo>,</m:mo>
		<m:mn>4</m:mn>
		<m:mo>,</m:mo>
		<m:mn>6</m:mn>
	      </m:mrow>
	    </m:apply>
	  </m:math>
	  <!-- j = 2,4,6 -->
	  
	  or, in matrix notation,
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:ci type="vector">y</m:ci>
	      <m:apply><m:times/>
		<m:ci type="matrix">G</m:ci>
		<m:ci type="vector">e</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  <!-- y = Ge -->
	  
	  where
	  <m:math display="block">
	    <m:apply><m:eq/>
	      <m:ci type="matrix">G</m:ci>
	      <m:matrix>
		<m:matrixrow><m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		  <m:cn>0</m:cn>
		</m:matrixrow>
		<m:matrixrow>
		  <m:cn>0</m:cn>
		  <m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>m</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		</m:matrixrow>
		<m:matrixrow>
		  <m:cn>0</m:cn><m:cn>0</m:cn>
		  <m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		</m:matrixrow>
		<m:matrixrow>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		  <m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>m</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:cn>0</m:cn><m:cn>0</m:cn>
		</m:matrixrow>
		<m:matrixrow>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		  <m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		  <m:cn>0</m:cn>
		</m:matrixrow>
		<m:matrixrow>
		  <m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		  <m:cn>0</m:cn>
		  <m:apply><m:divide/>
		    <m:cn>1</m:cn>
		    <m:ci><m:msub>
			<m:mi>R</m:mi>
			<m:mi>m</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:matrixrow>
	    </m:matrix>
	  </m:apply>
	</m:math>
	<!-- G = [ 1/R_i 0 0 0 0 0
                   0 1/R_m 0 0 0 0
                   0 0 1/R_i 0 0 0
                   0 0 0 1/R_m 0 0
                   0 0 0 0 1/R_i 0
                   0 0 0 0 0 1/R_m ] -->
      </para>
    </section>
    
    <section id="step3">
      <name>Strang Quartet, Step 3</name>
      <para id="p8">
	<cnxn target="kcl" strength="9">Step (S3)</cnxn>, <cnxn target="current" document="m0015" strength="4"> Kirchhoff's
	Current Law</cnxn>, states:

	<rule id="kir_cur_law" type="law">
	  <name>Kirchhoff's Current Law</name>
	  <statement>
	    <para id="rulep2">
	      The sum of the currents into each node must be zero. 
	    </para>
	  </statement>
	</rule>

	In our case
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:minus/>
	      <m:ci><m:msub>
		  <m:mi>i</m:mi>
		  <m:mn>0</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>1</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>
	<!-- i_0 - y_1 = 0 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:minus/>
	      <m:apply><m:minus/>
		<m:ci><m:msub>
		    <m:mi>y</m:mi>
		    <m:mn>1</m:mn>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>y</m:mi>
		    <m:mn>2</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>3</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>
	<!-- y_1 - y_2 - y_3 = 0 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:minus/>
	      <m:apply><m:minus/>
		<m:ci><m:msub>
		    <m:mi>y</m:mi>
		    <m:mn>3</m:mn>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>y</m:mi>
		    <m:mn>4</m:mn>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>5</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>
	<!-- y_3 - y_4 - y_5 = 0 -->

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:minus/>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>5</m:mn>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>y</m:mi>
		  <m:mn>6</m:mn>
		</m:msub></m:ci>
	    </m:apply>
	    <m:cn>0</m:cn>
	  </m:apply>
	</m:math>
	<!-- y_5 - y_6 = 0 -->

	or, in matrix terms
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:apply><m:times/>
	      <m:ci type="matrix">B</m:ci>
	      <m:ci type="vector">y</m:ci>
	    </m:apply>
	    <m:apply><m:minus/>
	      <m:ci type="vector">f</m:ci>
	    </m:apply>
	  </m:apply>
	</m:math>
	<!-- By = -f -->

	where
	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci>B</m:ci>
	    <m:matrix>
	      <m:matrixrow><m:cn>-1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		<m:cn>0</m:cn><m:cn>0</m:cn></m:matrixrow>
	      <m:matrixrow><m:cn>1</m:cn><m:cn>-1</m:cn><m:cn>-1</m:cn><m:cn>0</m:cn>
		<m:cn>0</m:cn><m:cn>0</m:cn></m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>1</m:cn><m:cn>-1</m:cn>
		<m:cn>-1</m:cn><m:cn>0</m:cn></m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
		<m:cn>1</m:cn><m:cn>-1</m:cn></m:matrixrow>
	    </m:matrix>
	  </m:apply>
	  <!-- B = [ -1  0  0  0  0  0 
                      1 -1 -1  0  0  0
                      0  0  1 -1 -1  0
                      0  0  0  0  1 -1  ] -->
  
	  <m:mtext>  and  </m:mtext>

	  <m:apply><m:eq/>
	    <m:ci type="vector">f</m:ci>
	    <m:vector>
	      <m:ci><m:msub>
		  <m:mi>i</m:mi>
		  <m:mn>0</m:mn>
		</m:msub></m:ci>
	      <m:cn>0</m:cn>
	      <m:cn>0</m:cn>
	      <m:cn>0</m:cn>
	    </m:vector>
	  </m:apply>
	</m:math>
	<!-- f = [i_0; 0; 0; 0] -->
      </para>
    </section>
    
    <section id="step4">
      <name>Strang Quartet, Step 4</name>
      <para id="p9">
	Looking back at <m:math><m:ci type="matrix">A</m:ci></m:math>:

	<m:math display="block">
	  <m:apply><m:eq/>
	    <m:ci type="matrix">A</m:ci>
	    <m:matrix>
	      <m:matrixrow><m:cn>-1</m:cn><m:cn>1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>0</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>1</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>0</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn><m:cn>1</m:cn>
	      </m:matrixrow>
	      <m:matrixrow><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>0</m:cn><m:cn>-1</m:cn>
	      </m:matrixrow>
	    </m:matrix>
	  </m:apply>
	</m:math>
	<!-- A = [ -1  1  0  0
                    0 -1  0  0
                    0 -1  1  0
                    0  0 -1  0
                    0  0 -1  1
                    0  0  0 -1 ] -->

	we recognize in <m:math><m:ci type="matrix">B</m:ci></m:math>
	the <term>transpose</term> of <m:math><m:ci type="matrix">A</m:ci></m:math>.  Calling it such, we recall
	our main steps
	
	<list id="recall_steps" type="bulleted">
	  <item>
	    (S1) 
	    <m:math display="inline">
	      <m:apply><m:eq/>
		<m:ci type="vector">e</m:ci>
		<m:apply><m:minus/>
		  <m:apply><m:times/>
		    <m:ci type="matrix">A</m:ci>
		    <m:ci type="vector">x</m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:math>,
	    <!-- e = -Ax -->
	  </item>
	  
	  <item>
	    (S2) 
	    <m:math display="inline">
	      <m:apply><m:eq/>
		<m:ci type="vector">y</m:ci>
		<m:apply><m:times/>
		  <m:ci type="matrix">G</m:ci>
		  <m:ci type="vector">e</m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>, and
	    <!-- y = Ge --> 
	  </item>
	  
	  <item>
	    (S3)  
	    <m:math display="inline">
	      <m:apply><m:eq/>
		<m:apply><m:times/>
		  <m:apply><m:transpose/>
		    <m:ci type="matrix">A</m:ci>
		  </m:apply>
		  <m:ci type="vector">y</m:ci>
		</m:apply>
		<m:apply><m:minus/>
		  <m:ci type="vector">f</m:ci>
		</m:apply>
	      </m:apply>
	    </m:math>.
	    <!-- A'y = -f -->
	  </item>
	</list>

	On substitution of the first two into the third we arrive, in
	accordance with <cnxn target="combined_rule" strength="9">(S4)</cnxn>, at

	<equation id="eqn1_1">
	  <m:math display="block">
	    <m:apply><m:eq/>
	      <m:apply><m:times/>
		<m:apply><m:transpose/>
		  <m:ci type="matrix">A</m:ci>
		</m:apply>
		<m:ci type="matrix">G</m:ci>
		<m:ci type="matrix">A</m:ci>
		<m:ci type="vector">x</m:ci>
	      </m:apply>
	      <m:ci type="vector">f</m:ci>
	    </m:apply>
	    <m:mtext>.</m:mtext>
	  </m:math>
	  <!-- A'GAx = f -->    
	</equation>

	This is a system of four equations for the 4 unknown potentials, 
	<m:math display="inline">
	  <m:ci><m:msub>
	      <m:mi>x</m:mi>
	      <m:mn>1</m:mn>
	    </m:msub></m:ci>
	</m:math>
	<!-- x_1 -->

	through
	<m:math display="inline">
	  <m:ci><m:msub>
	      <m:mi>x</m:mi>
	      <m:mn>4</m:mn>
	    </m:msub></m:ci>
	</m:math>.
	<!-- x_4 -->
	
	As you know, the system <cnxn target="eqn1_1" strength="9"/>
	may have either 1, 0, or infinitely many solutions, depending
	on <m:math><m:ci type="vector">f</m:ci></m:math> and

	<m:math display="inline">
	  <m:apply><m:times/>
	    <m:apply><m:transpose/>
	      <m:ci type="matrix">A</m:ci>
	    </m:apply>
	    <m:ci type="matrix">G</m:ci>
	    <m:ci type="matrix">A</m:ci> 
	  </m:apply>
	</m:math>.
	<!-- A'GA -->

	We shall devote (FIX ME CNXN TO CHAPTER 3 AND 4) to an 
	unraveling of the previous sentence. For now, we cross our fingers and 
	`solve' by invoking the Matlab program,
	<link src="http://www.caam.rice.edu/~caam335/cox/lectures/fib1.m">fib1.m
	</link>.
      </para>
      
      <figure id="fig1_4">
	<name>Results of a 64 compartment simulation</name>
	<media type="image/png" src="fib1_fig1.png"/>
      </figure>

      <figure id="fig1_5" orient="horizontal">
	<name>Results of a 64 compartment simulation</name>
	<subfigure>
	  <media type="image/png" src="fib1_fig2.png"/>
	</subfigure>
	<subfigure>
	  <media type="image/png" src="fib1_fig3.png"/>
	</subfigure>
      </figure>

      <para id="p10">
	This program is a bit more ambitious than the above in that it
	allows us to specify the number of compartments and that
	rather than just spewing the <m:math><m:ci>x</m:ci></m:math>
	and <m:math display="inline"><m:ci>y</m:ci></m:math> values it
	plots them as a function of distance along the fiber.  We note
	that, as expected, everything tapers off with distance from
	the source and that the axial current is significantly greater
	than the membrane, or leakage, current.
      </para>
    </section>
  </section>

  <section id="example_2">
    <name>Example</name>
    <para id="p11">
      We have seen in the <cnxn target="example_1" strength="9">previous example</cnxn> how a current source may
      produce a potential difference across a cell's membrane.  We
      note that, even in the absence of electrical stimuli, there is
      always a difference in potential between the inside and outside
      of a living cell. In fact, this difference is the biologist's
      definition of `living.' Life is maintained by the fact that the
      cell's interior is rich in potassium ions,

      <m:math display="inline">
	<m:msup>
	  <m:mtext>K</m:mtext>
	  <m:mo>+</m:mo>
	</m:msup>
      </m:math>,
      <!-- K^+ -->

      and poor in sodium ions,

      <m:math display="inline">
	<m:msup>
	  <m:mtext>Na</m:mtext>
	  <m:mo>+</m:mo>
	</m:msup>
      </m:math>,
      <!-- Na^+ -->

      while in the exterior medium it is just the opposite. These
      concentration differences beget potential differences under the
      guise of the Nernst potentials:

      <definition id="nernst">
	<term>Nernst potentials</term>
	<meaning>
	  <m:math display="block">
	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>E</m:mi>
		  <m:mtext>Na</m:mtext>
		</m:msub></m:ci>
	      <m:apply><m:times/>
		<m:apply><m:divide/>
		  <m:apply><m:times/>
		    <m:ci>R</m:ci>
		    <m:ci>T</m:ci>
		  </m:apply>
		  <m:ci>F</m:ci>
		</m:apply>
		<m:apply><m:log/>
		  <m:apply><m:divide/>
		    <m:ci><m:msub>
			<m:mtext>[Na]</m:mtext>
			<m:mi>o</m:mi>
		      </m:msub></m:ci>
		    <m:ci><m:msub>
			<m:mtext>[Na]</m:mtext>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <!-- E_Na = (RT / F) * log ( [Na]_o / [Na]_i ) -->

	    <m:mrow><m:mtext>  and  </m:mtext></m:mrow>

	    <m:apply><m:eq/>
	      <m:ci><m:msub>
		  <m:mi>E</m:mi>
		  <m:mtext>K</m:mtext>
		</m:msub></m:ci>
	      <m:apply><m:times/>
		<m:apply><m:divide/>
		  <m:apply><m:times/>
		    <m:ci>R</m:ci>
		    <m:ci>T</m:ci>
		  </m:apply>
		  <m:ci>F</m:ci>
		</m:apply>
		<m:apply><m:log/>
		  <m:apply><m:divide/>
		    <m:ci><m:msub>
			<m:mtext>[K]</m:mtext>
			<m:mi>o</m:mi>
		      </m:msub></m:ci>
		    <m:ci><m:msub>
			<m:mtext>[K]</m:mtext>
			<m:mi>i</m:mi>
		      </m:msub></m:ci>
		  </m:apply>
		</m:apply>
	      </m:apply>
	    </m:apply>
	    <!-- E_K = (RT / F) * log ( [K]_o / [K]_i ) -->
	  </m:math>

	  where <m:math><m:ci>R</m:ci></m:math> is the gas constant,
	  <m:math display="inline"><m:ci>T</m:ci></m:math> is
	  temperature, and <m:math><m:ci>F</m:ci></m:math> is the
	  Faraday constant.
	</meaning>
      </definition>

      Associated with these potentials are membrane resistances
      <m:math display="block">
	  <m:ci><m:msub>
	    <m:mi>ρ</m:mi>
	    <m:mrow>
	      <m:mi>m</m:mi> 
	      <m:mo>,</m:mo>
	      <m:mtext>Na</m:mtext>
	    </m:mrow>
	  </m:msub></m:ci>
	<!-- rho_m,Na -->
	
	<m:mrow><m:mtext>  and  </m:mtext></m:mrow>
	
	  <m:ci><m:msub>
	  <m:mi>ρ</m:mi>
	  <m:mrow>
	    <m:mi>m</m:mi> 
	    <m:mo>,</m:mo>
	    <m:mtext>K</m:mtext>
	  </m:mrow>
	</m:msub></m:ci>
      </m:math>
      <!-- rho_m,K -->
	
      that together produce the
      <m:math display="inline">
	<m:ci><m:msub>
	    <m:mi>ρ</m:mi>
	    <m:mi>m</m:mi>
	  </m:msub></m:ci>
      </m:math>

      <cnxn target="cell_membrane_resist" strength="7">above </cnxn> via

      <m:math display="block">
	<m:apply><m:eq/>
	  <m:apply><m:divide/>
	    <m:cn>1</m:cn>
	    <m:ci><m:msub>
		<m:mi>ρ</m:mi>
		<m:mi>m</m:mi>
	      </m:msub></m:ci>
	  </m:apply>
	  <m:apply><m:plus/>
	    <m:apply><m:divide/>
	      <m:cn>1</m:cn>
	      <m:ci><m:msub>
		  <m:mi>ρ</m:mi>
		  <m:mrow>
		    <m:mi>m</m:mi>
		    <m:mo>,</m:mo>
		    <m:mtext>Na</m:mtext>
		  </m:mrow>
		</m:msub></m:ci>
	    </m:apply>
	    <m:apply><m:divide/>
	      <m:cn>1</m:cn>
	      <m:ci><m:msub>
		  <m:mi>ρ</m:mi>
		  <m:mrow>
		    <m:mi>m</m:mi>
		    <m:mo>,</m:mo>
		    <m:mtext>K</m:mtext>
		  </m:mrow>
		</m:msub>
	      </m:ci>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      <!-- ( 1 / rho_m ) = ( 1 / rho_(m,Na) ) + ( 1 / rho_(m,K) ) -->
      
      and produce the aforementioned rest potential
      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci><m:msub>
	      <m:mi>E</m:mi>
	      <m:mi>m</m:mi>
	    </m:msub></m:ci>
	  <m:apply><m:times/>
	    <m:ci><m:msub>
		<m:mi>ρ</m:mi>
		<m:mi>m</m:mi>
	      </m:msub></m:ci>
	    <m:apply><m:plus/>
	      <m:apply><m:divide/>
		<m:ci><m:msub>
		    <m:mi>E</m:mi>
		    <m:mtext>Na</m:mtext>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mrow>
		      <m:mi>m</m:mi>
		      <m:mo>,</m:mo>
		      <m:mtext>Na</m:mtext>
		    </m:mrow>
		  </m:msub></m:ci>
	      </m:apply>
	      <m:apply><m:divide/>
		<m:ci><m:msub>
		    <m:mi>E</m:mi>
		    <m:mtext>K</m:mtext>
		  </m:msub></m:ci>
		<m:ci><m:msub>
		    <m:mi>ρ</m:mi>
		    <m:mrow>
		      <m:mi>m</m:mi>
		      <m:mo>,</m:mo>
		      <m:mtext>Na</m:mtext>
		    </m:mrow>
		  </m:msub></m:ci>
	      </m:apply>
	    </m:apply>
	  </m:apply>
	</m:apply>
      </m:math>
      <!-- E_m = rho_m * ( E_Na / rho_(m,Na) + ( E_K / rho_(m,K) ) ) -->
    </para>

    <para id="p12">
      With respect to <cnxn target="fully_dressed_circuit" strength="8">our old circuit model</cnxn>, each compartment
	now sports a battery in series with its membrane resistance,
	as shown in <cnxn target="resting_pot_circuit" strength="9"/>.
    </para>

    <figure id="resting_pot_circuit">
      <name>Circuit model with resting potentials</name>
      <media type="image/png" src="cell4.png"/>
    </figure>

    <para id="p13">
      Revisiting <cnxn target="strang_quartet" strength="9"> steps
      (S1-4)</cnxn> we note that in (S1) the even numbered voltage
      drops are now
      
      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci><m:msub>
	      <m:mi>e</m:mi>
	      <m:mn>2</m:mn>
	    </m:msub></m:ci>
	  <m:apply><m:minus/>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>2</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>E</m:mi>
		<m:mn>m</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
      <!-- e_2 = x_2 - E_m -->

      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci><m:msub>
	      <m:mi>e</m:mi>
	      <m:mn>4</m:mn>
	    </m:msub></m:ci>
	  <m:apply><m:minus/>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>3</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>E</m:mi>
		<m:mn>m</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
      <!-- e_4 = x_3 - E_m -->
      
      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci><m:msub>
	      <m:mi>e</m:mi>
	      <m:mn>6</m:mn>
	    </m:msub></m:ci>
	  <m:apply><m:minus/>
	    <m:ci><m:msub>
		<m:mi>x</m:mi>
		<m:mn>4</m:mn>
	      </m:msub></m:ci>
	    <m:ci><m:msub>
		<m:mi>E</m:mi>
		<m:mn>m</m:mn>
	      </m:msub></m:ci>
	  </m:apply>
	</m:apply>
      </m:math>
      <!-- e_6 = x_4 - E_m -->

      We accommodate such things by generalizing 
      <cnxn target="voltage_drop" strength="8">(S1)</cnxn> to:

      <list id="voltage_drop_ver2" type="bulleted">
	<item>
	 (S1') Express the voltage drops as
	  
	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:ci>e</m:ci>
	      <m:apply><m:minus/>
		<m:ci type="vector">b</m:ci>
		<m:apply><m:times/>
		  <m:ci type="matrix">A</m:ci>
		  <m:ci type="vector">x</m:ci>
		</m:apply>
	      </m:apply>
	    </m:apply>
	  </m:math>
	  
	  where <m:math display="inline"><m:ci type="vector">b</m:ci></m:math> is the vector of batteries.
	</item>
      </list>

      No changes are necessary for (S2) and (S3). The final step now reads,
      
      <list id="final_step" type="bulleted">
	<item>(S4') Combine
	  <cnxn target="voltage_drop_ver2" strength="6">(S1')</cnxn>,
	  <cnxn target="ohms_law" strength="7">(S2)</cnxn>, and 
	  <cnxn target="kcl" strength="7">(S3) </cnxn> to produce

	  <m:math display="inline">
	    <m:apply><m:eq/>
	      <m:apply><m:times/>
		<m:apply><m:transpose/>
		  <m:ci type="matrix">A</m:ci>
		</m:apply>
		<m:ci type="matrix">G</m:ci>
		<m:ci type="matrix">A</m:ci>
		<m:ci type="vector">x</m:ci>
	      </m:apply>
	      <m:apply><m:plus/>
		<m:apply><m:times/>
		  <m:apply><m:transpose/>
		    <m:ci type="matrix">A</m:ci>
		  </m:apply>
		  <m:ci type="matrix">G</m:ci>
		  <m:ci type="vector">b</m:ci>
		</m:apply>
		<m:ci type="vector">f</m:ci>
	      </m:apply>
	    </m:apply>
	  </m:math>.
	  <!-- A'GAx = A'Gb + f -->
	</item>
      </list>
    </para>

    <para id="p14">
      Returning to <cnxn target="resting_pot_circuit" strength="8"/>,
      we note that

      <m:math display="block">
	<m:apply><m:eq/>
	  <m:ci type="vector">b</m:ci>
	  <m:apply><m:minus/>
	    <m:apply><m:times/>
	      <m:ci type="matrix"><m:msub>
		  <m:mi>E</m:mi>
		  <m:mi>m</m:mi>
		</m:msub></m:ci>
	      <m:vector>
		<m:cn>0</m:cn><m:cn>1</m:cn>
		<m:cn>0</m:cn><m:cn>1</m:cn>
		<m:cn>0</m:cn><m:cn>1</m:cn>
	      </m:vector>
	    </m:apply>
	  </m:apply>
	</m:apply>
	<!-- b = -E_m [ 0 1 0 1 0 1 ]' -->

	<m:mrow>
	  <m:mi> </m:mi><m:mi> </m:mi>
	  <m:mi> </m:mi><m:mi> </m:mi>
	  <m:mtext>and</m:mtext>
	  <m:mi> </m:mi><m:mi> </m:mi>
	  <m:mi> </m:mi><m:mi> </m:mi>
	</m:mrow>
	
	<m:apply><m:eq/>
	  <m:apply><m:times/>
	    <m:apply><m:transpose/>
	      <m:ci type="matrix">A</m:ci>
	    </m:apply>
	    <m:ci type="matrix">G</m:ci>
	    <m:ci type="vector">b</m:ci>
	  </m:apply>
	  <m:apply><m:times/>
	    <m:apply><m:divide/>
	      <m:ci><m:msub>
		  <m:mi>E</m:mi>
		  <m:mi>m</m:mi>
		</m:msub></m:ci>
	      <m:ci><m:msub>
		  <m:mi>R</m:mi>
		  <m:mi>m</m:mi>
		</m:msub></m:ci>
	    </m:apply>
	    <m:vector>
	      <m:cn>0</m:cn><m:cn>1</m:cn>
	      <m:cn>1</m:cn><m:cn>1</m:cn>
	    </m:vector>
	  </m:apply>
	</m:apply>
	<!-- A'Gb = ( E_m / R_m ) [ 0 1 1 1 ]' -->
      </m:math>

	This requires only minor changes to our old code. The new
	program is called <link src="http://www.caam.rice.edu/~caam335/cox/lectures/fib2.m">fib2.m
	</link> and results of its use are indicated in the next two
	figures.
      </para>
    
      <figure id="fig1_7">
	<name>Results of a 64 compartment simulation with batteries</name>
	<media type="image/png" src="fib2_fig1.png"/>
      </figure>

      <figure id="fig1_8" orient="horizontal">
	<name>Results of a 64 compartment simulation with batteries</name>
	<subfigure>
	  <media type="image/png" src="fib2_fig2.png"/>
	</subfigure>
	<subfigure>
	  <media type="image/png" src="fib2_fig3.png"/>
	</subfigure>
      </figure>
    </section>
  </content>

  <bib:file>
    <bib:entry id="strang">
      <bib:book>
	<bib:author>G. Strang,</bib:author>
	<bib:title>Introduction to Applied Mathematics</bib:title>
	<bib:publisher>Wellesley-Cambridge Press</bib:publisher>
	<bib:year>1986</bib:year>
      </bib:book>
    </bib:entry>
  </bib:file>
</document>
