null space of a specific 4x4 symbolic matrix

894 Views Asked by At

I need to find the symbolic null space vector (let's call it X ) of a symbolic matrix:

P = [a*P1     (1-a)*P1     (1-b)*(1-P1)  b*(1-P1);    
     a*P1     (1-a)*P1     (1-b)*(1-P1)  b*(1-P1);    
     b*(1-P2) (1-b)*(1-P2) (1-b)*P2      b*(1-P2);    
     b*(1-P2) (1-b)*(1-P2) (1-b)*P2      b*(1-P2)];

the determinant of P equals 0, and sum(X) should be equal 1.

I made the following Matlab code (created with a help of math.community):

clear all; clc;
syms a b P1 P2;
assume([a b P1 P2],'real')
%    
P = [a*P1     (1-a)*P1     (1-b)*(1-P1)  b*(1-P1);    
     a*P1     (1-a)*P1     (1-b)*(1-P1)  b*(1-P1);    
     b*(1-P2) (1-b)*(1-P2) (1-b)*P2      b*(1-P2);    
     b*(1-P2) (1-b)*(1-P2) (1-b)*P2      b*(1-P2)];    
I = [1 0 0 0;
     0 1 0 0;
     0 0 1 0; 
     0 0 0 1];

sol = null((P-I)')'

I may understand (as a person with a weak/"week" math background) that there may be no easy or trivial symbolic solution. For the moment, both Matlab and Mathematica give me [ empty sym ] solution. Can I introduce somehow the criterion sum(X) == 1 in the search ? If there are other software packages/libraries I could use in order to solve this particular problem ? If there is 1k possible solutions, I, actually, will be happy to get first 10 (that do differ from [0 0 0 0])... :-) Thanks !

  -----------------------------------

Ok, thanks much. I am reformulating my question below.

I have a 2 x 2 stochastic matrix with the det= 0: syms s;

%    
P = [s  1-s;
     s  1-s];
I = [1 0;
     0 1];

I know that the solution of Ct*(P - 1) == 0 gives a symbolic vector Ct with real values {s, 1 - s}, which equals to 1. (Actually, s - is probability, a value in between 0 and 1, thus, can not be neither negative nor complex or whatever)

I need to find somehow the analogous real symbolic solution(s) for the 4x4 symbolic matrix on the top.

1

There are 1 best solutions below

5
On

The nullspace of a matrix $A$ is, by definition, the set of all vectors $x$ such that $Ax = 0$. Since you're looking for the transpose of the nullspace of $(P - I)^T$, this is equivalent to solving the equation $(P - I)^Tx^T = 0$, which, after rearrangement, is equivalent to $xP = x$.

This is a special case of the left-hand eigenvalue problem $xP = \lambda x$, or equivalently the transpose of the right hand nullspace of $P^T$, $P^T x^T = \lambda x^T$, with $\lambda = 1$.

Eigenvalue problems are the subject of a great deal of study, and there are plenty of good explanations already available on how to solve them. If you want to do it by hand, search for "characteristic equation eigenvalues". Since you have access to a symbolic manipulation package, ask it to calculate the eigenvalues of $P^T$. These are the values of $\lambda$ that satisfy the right-hand eigenvalues equations above. If one of them is $1$, then the nullspace of your system will be the space spanned by the eigenvectors associated with the eigenvalue $\lambda = 1$. If (as I suspect), $1$ is not an eigenvalue, then the nullspace of (P - I)' is empty.