1
$\begingroup$

How can I solve the forward equation

S[t]=C+A*S[t+1]*(Inverse((I-B*S(t+1)))*A

for t=1 to t=10 and S[11]=0 with S, A, C, and B beeing 2*2 matrices?

A={{0.1,0},{0,0.1}}
B={{2,3},{-3,1}}, C={{0.2,0.6},{0.2,0}}, I={{1,0},{0,1}} 
$\endgroup$
3
  • $\begingroup$ A={{0.1,0},{0,0.1}} $\endgroup$
    – mehrnoosh
    Mar 1 '15 at 22:32
  • $\begingroup$ B={{2,3},{-3,1}}, C={{0.2,0.6},{0.2,0}}, I={{1,0},{0,1}} $\endgroup$
    – mehrnoosh
    Mar 1 '15 at 22:33
  • 1
    $\begingroup$ Please include these in the question instead of posting them as comments, such that someone can just copy all the necessary code from the question. $\endgroup$ Mar 1 '15 at 23:14
2
$\begingroup$

With

a = {{0.1, 0}, {0, 0.1}};
b = {{2, 3}, {-3, 1}};
c = {{0.2, 0.6}, {0.2, 0}};
i = {{1, 0}, {0, 1}};

and

s[t_] := {{s11[t], s12[t]}, {s21[t], s22[t]}}

one can see that s12 and s21 don't depend on t by evaluating

c + a*s[t + 1]*Inverse[i - b*s[t + 1]]*a

Therefore I set

s[11] = {{0, 0.6}, {0.2, 0}}

Redefining s with

s[t_] := s[t] = c + a*s[t + 1]*Inverse[i - b*s[t + 1]]*a

one can find s for t = 10 and any other integer t <= 11 using

s[10]
{{0.2, 0.6}, {0.2, 0.}}
$\endgroup$
4
  • $\begingroup$ how can i define a loop for t=1 , t=10 , for above problem? $\endgroup$
    – mehrnoosh
    Mar 2 '15 at 6:37
  • $\begingroup$ @mehrnoosh You can use Table[s[t], {t, 10}]. $\endgroup$
    – Karsten 7.
    Mar 2 '15 at 8:57
  • $\begingroup$ Karsten 7. - I suspect the OP means for the recursion to be: s[t_] := s[t] = c + a.s[t + 1].Inverse[i - b.s[t + 1]].a; and the initial condition to be s[11]={{0,0},{0,0}}. Fixing these, you can get the iteration by s[#] & /@ Range[10, 0, -1] $\endgroup$
    – bill s
    Mar 2 '15 at 9:08
  • $\begingroup$ @mehrnoosh Could you clarify if you mean Times(*, element-wise multiplication) or Dot(., matrix product). $\endgroup$
    – Karsten 7.
    Mar 2 '15 at 10:16
1
$\begingroup$
a = {{a1, a2}, {a3, a4}};
b = {{b1, b2}, {b3, b4}};
c = {{c1, c2}, {c3, c4}};
s[11] = {{0, 0}, {0, 0}};
s[10] = c + a.s[11].Inverse[IdentityMatrix[2] - b.s[11]].a

which immediately returns

{{c1, c2}, {c3, c4}}

Trying to use upper case characters, like C, for variable names results in errors. Trying to use "abstract" vectors and matricies results in errors. Trying to use * instead of . for matrix multiplication results in errors. In slightly more complicated questions you may need to use Simplify and possibly supply assumptions about variable domains.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.