# Solving general system of equations

I want to find the closed form solution to a general system of equations. The number of equations and variables is C. How do I specify the system of equations?

If I use Solve, I can solve a system of equations with a fixed number of variables. What should I do if the number of equations and variables is not fixed.

The equations are of the form:

$p_i = q_i + o_{i0}p_0 + o_{i1}p_1 + \cdots + o_{iC-1}p_{C-1}$

for $i = 0$ to $C-1$

I tried doing

Solve[{p[j] == q[j] + sum[o[j, i]*p[i], {i, 0, C - 1}]}, {p[j]}]


but I am not getting any output.

• Welcome to Mathematica.SE! 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour and check the faqs! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – user9660 Feb 12 '16 at 6:59
• People here generally like users to post Mathematica code, so they can copy-paste it. It makes it convenient for them and more likely you will get someone to help you. – user9660 Feb 12 '16 at 7:00
• I dont know how to specify a variable number of equations in mathematica as well :( – Priya P Feb 12 '16 at 7:12
• Where exactly did your system of equations come from? Are they algebraic or transcendental? – J. M.'s technical difficulties Feb 12 '16 at 7:14
• algebraic. I have a continuous time two dimensional markov chain with a general number of states. I want to find the stationary distribution. – Priya P Feb 12 '16 at 7:15