Home / Infinite System of Matrix Equations
Name Modified Size InfoDownloads / Week
Parent folder
readme.txt 2012-04-20 4.5 kB
infinite_system_of_matrix_equations.rar 2012-04-20 715.1 kB
Totals: 2 Items   719.6 kB 0
The project "Infinity System of Matrix Equations" was developed for solving the 
following system of matrix equations

		[4*B-A^2, X]=0,
	(1)	[[4*B-A^2, A], X]=0,
		[[[4*B-A^2, A], A], X]=0,
		[[[[4*B-A^2, A], A], A], X]=0,
		[[[[[4*B-A^2, A], A], A], A], X]=0,
                ...................................
		and so on to infinity,
                ...................................

where A and B are given matrices and matrix X is the unknown; [A, B]=A*B-B*A. 

I have encountered this system when using stability preserving structural 
transformations for stability investigation of systems of second-order 
ordinary differential equations (for more detail see http://arxiv.org/abs/1204.1814).

It is easy to see that system (1) always possesses an infinite number 
(multi-parametric family) of solutions. Thus, to find all the solutions of the system 
we cannot take advantage of iterative methods, we have to use exact methods instead. 
In the project I have used the Gaussian elimination method. 

Evidently, to find the exact solution to a given system of linear equations 
we have to confine ourselves to use rational arithmetic (no rounding errors). 
In the project I took advantage of using the rational type mpq_t from The GNU 
Multiple Precision Arithmetic Library (see http://gmplib.org/).

For the sake of convenience, I have implemented a C++ class for managing matrices 
based on the type mpq_t (see class Matrix in Matrix.h and Matrix.cpp).

The project was developed under MS Visual Studio 2005.

					How to use?
1) Extract the contents of the archive "infinity_system_of_matrix_equations.rar" 
to some directory;
2) Open file "inf_matrix_system.vcproj" with MS Visual Studio;
3) Build the project;
4) Place files "inf_matrix_system.exe" (which was built in the previous step), 
"A.txt" and "B.txt" (the latter two files you can find in the archive) to the 
same directory;
5) Run inf_matrix_system.exe;
6) Open the file "Ans.txt", which will be created during the execution of 
"inf_matrix_system.exe". This file contains the solution to the system (1) with the
matrices A and B loaded from files "A.txt" and "B.txt" respectively.


In the file A.txt from the archive you can find the description of matrix A:

4, 4,
4119/2635, 679/2635, -1162/2635, 1111/2635, 
-437/2635, 4113/2635, 7576/2635, 4902/2635, 
15/527, -105/527, 1614/527, 290/527, 
1392/2635, -258/2635, -1786/2635, 2143/2635,

This description means that the matrix A has dimension 4x4 and looks like the following:

	4119  679   -1162  1111 
        ----  ----  -----  ----
  	2635  2635   2635  2635
 
        -437  4113  7576   4902 
        ----  ----  ----   ----	
        2635  2635  2635   2635
 A=
        15    -105  1614   290 
        ---   ----  ----   ---  
        527    527  527    527

	1392  -258  -1786  2143
        ----  ----  -----  ----
        2635  2635   2635  2635 

Similarly to this, the matrix B from the file B.txt can be imagened in the following form:

	 7499   -2192   86    -534 
         ----   -----   ---   ----
         2635    2635   155    527

	 -15417  56697  -2041  3087 
         ------  -----  -----  ----
          2635   5270    310   527
 B=
	 -725    2335   161    1255 
         ----    ----   ---    ----
          527    1054    62    527

	 7027   -12557  811    948
         ----   ------  ---    ---
         2635    5270   310    527

In the file Ans.txt you can find the following:

4, 4,
1651/1536*C1+C2, -53/256*C1, 1/768*C1, -25/96*C1, 
-4/3*C1, 2113/512*C1+C2, -121/96*C1, 5125/1536*C1, 
25/768*C1, 925/1536*C1, 215/96*C1+C2, 2075/1536*C1, 
29/48*C1, -451/384*C1, C1, C2, 


This means that the solution X of system (1) has the form

	1651*C1       -53*C1          1*C1         -25*C1 
        ------- + C2  ------          -----        ------
        1536           256             768           96

	-4*C1         2113*C1         -121*C1       5125*C1 
        -----         ------- + C2    -------      --------
          3             512              96         1536
 X=
	25*C1         925*C1          215*C1       2075*C1 
        -----         ------          ------ + C2  -------
         768           1536            96            1536
	
	29*C1,        -451*C1                        
       	-----	      -------	      C1             C2									
          48            384

Here C1, C2 are the arbitrary parameters.
Source: readme.txt, updated 2012-04-20