title: Equation containing a matrix power
body: <p>I have an equation on the form A^n*b =e= c where A is a matrix and b &amp; c are column vectors. </p>
  
  <p>n is a fixed number for my model determined by a constant. It will most likely be in the hundreds and be changed for different solutions. </p>
  
  <p>A is a matrix of variables, b &amp; c are constants. </p>
  
  <p>How can I formulate A^n*b =e= c in gams?</p>
  
  <p>Optionally: the model that lead me to this is that I have a graph with a connectivity matrix con(x,x2) denoting the connectivity between x and x2 when x and x2 are connected. I would like to calculate the connection between 2 arbitrary nodes, the connectivity between 2 nodes x to x2 is the sum of the connectivity for all paths from x to x2. the connectivity for a path is the product of all connections along the path. Is there a smarter way to formulate this constraint so that I don't have to do matrix exponentiation?</p>
  
  <p>A is not symmetric or invertible but is positive Semidefinite.</p>