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.