L 7: Linear Systems and Metabolic Networks
Linear Equations
• Form
• System1 1 2 2 n na x a x a x b
11 1 12 2 1 1
21 1 22 2 2 2
1 1 2 2
n n
n n
m m mn n m
a x a x a x b
a x a x a x b
a x a x a x b
Linear Systems
11 1 12 2 1 1
21 1 22 2 2 2
1 1 2 2
n n
n n
m m mn n m
a x a x a x b
a x a x a x b
a x a x a x b
Ax b
11 12 1 1
21 22 2 2
1 2
n
n
m m mn m
a a a b
a a a b
a a a b
A b
Vocabulary
• If b=0, then system is homogeneous
• If a solution (values of x that satisfy equation) exists, then system is consistent, else it is inconsistent.
Solve system using Gaussian Elimination
• Form Augmented Matrix, • Row equivalence, can scale rows and add and
subtract multiples to transform matrix
11 12 1 1 1
21 22 2 2 2
1 2
1 0 0
0 1 0
0 0 1
n
n
m m mn m n
a a a b d
a a a b dm n
a a a b d
11 12 1 1 1
21 22 2 2 2
1 2
1 0 0
0 1 0
0 1 1
n
n
m m mn m m
a a a b d
a a a b dm n
a a a b d
1
211 12 1 1
21 22 2 2
1 2
1 0 0
0 1
0
0 0 1
0 0 0 0
0 0 0 0
n
nn
m m mn m
d
da a a b
a a a bm nd
a a a b
Underdetermined: more unknowns, than equations, multiple solutions
Overdetermined: fewer unknowns, than equations, if rows all independent, then no solution
Linear Dependency
• Vectors are linearly independent iff
• has the trivial solution that all the coefficients are equal to zero
• If m>n, then vectors are dependent
1 1
1
0
, , x1m m
m
a a
vectors are size n
x x
x x
Subspace of a vector space
• Defn: Subspace S of Vn
– Zero vector belongs to S– If two vectors belong to S, then their sum belongs to S– If one vector belongs to S then its scale multiple
belongs to S
• Defn: Basis of S: if a set of vectors are linearly independent and they can represent every vector in the subspace, then they form a basis of S
• The number of vectors making up a basis is called the dimension of S, dim S < n
Rank
• Rank of a matrix is the number of linearly independent columns or rows in A of size mxn. Rank A < min(m,n).
Inverse Matrix
• Cannot divide by a matrix
• For square matrices, can find inverse
• If no inverse exists, A is called singular.
• Other useful facts:
1 1n
AA I A A
11
1 1 1
n
A I
AB B A
Eigenvectors and Eigenvalues
• Definition, let A be an nxn square matrix. If is a complex number and b is a non-zero complex vector (nx1) satisfying: Ab=b
• Then b is called an eigenvector of A and is called an eigenvalue.
• Can solve by finding roots of the characteristic equation (3.2.1.5)
0nDet A I
Linear ODEs
1 11 1 12 2 1 1
2 21 1 22 2 2 2
1 1 2 2
n n
n n
n n n n n n
x a x a x a x z
x a x a x a x z
x a x a x a x z
x Ax z
Steady-state Solution
• Under steady state conditions
• Need to find x:
0 x Ax z
Ax z
1x A z
Time Course
• Take a first order, linear, homogeneous ODE:
• Solution is an exponential of the form
• Put into equation, solve for constant using ICs gives:
111 1
dxa x
dt
1 1tx t b e
1101 1
a tx t x e
Effect of exponential power
• What happens for different values of a11?
• Options: if system is perturbed– Stable- system goes to a steady-state– Unstable: system leaves steady-state– Metastable: system is indifferent
1101 1
a tx t x e
Matrix Time Course
• Take a first order, linear, homogeneous ODE:
• Solution is an exponential of the form
• General solution:
x Ax
tt ex b
1
i
nt
i ii
t c e
x b
Why are linear systems so important?
• Can solve it, analytically and via computer
• Gaussian Elimination at steady state
• Properties are well-known
• BUT: world is nonlinear, see systems of equations from simple systems that we have already looked at
Linearization
• Autonomous Systems: does not explicitly depend on time (dx/dt=f(x,p))
• Approximate the change in system close to a set point or steady state with a linear equation.
• It is good in a range around that point, not everywhere
Linearization• At steady state, look at deviation:
• Use Taylor’s Expansion to approximate:
de tde t e t
dt dt x f x x
1 1
2
11 1 1
, .
1, .
2
ii n n
n n ni i
i n j j kj j kj j k
de tf x e x e
dt
f ff x x e e e HOT
x x x
Linearization• First term is zero by SS assumption,
assume H.O.T.s are small, so left with first order terms
1 1
n ni i
j ij jj jj
de t fe a e
dt x
Stoichiometric Matrices
• Look at substances that are conserved in system, mass and flow
• Coefficients are proportion of substrate and product
1 2 2S S P
1 1 2
1 1 2
1 2, , 2 ,dS dS dP
v v vdt dt dt
Stoichiometric Network
• Matrix with m substrates and r reactions
• N ={nij} is the matrix of size mxr
1
1,r
i ij jj
S n v i m
S = Nv
External fluxesConventions are left to right and top down.
Sv 0
Column/Row Operations
• System can be thought of as operating in row or column space
ri
ci
ith row of
ith column of
a A
a A
Subspaces of Linear Systems