0

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
    Or if you mean "weak" instead of "week", it makes no difference... – Joonas Ilmavirta Aug 24 '14 at 14:26
  • I assume you want the right null space? Also, why are you asking for the null space of $P - I$ ? $P$ is clearly degenerate (you can see that the rows are not linearly independent), but that doesn't necessarily mean that $P - I$ is. – DanielV Aug 24 '14 at 16:37

1 Answers1

0

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.

DomJack
  • 196
  • ... and I just re-read your question. The above answer is based on finding the nullspace of (P - I)', as you've asked for in your code, rather than in your question itself. If you're after the transposed nullspace of P' on it's own, just change your code to "sol = null(P')'" – DomJack Aug 25 '14 at 01:43
  • please, see the additional section to the very first question – Моше Шуцерман Aug 31 '14 at 09:45
  • ... just so that we're on the same page here, can you confirm the following is what you're after:

    Given 4 probabilities p1, p2, p3, p4 where 0 <= pi <= 1 and p1 + p2 + p3 + p4 = 1, you want to find the vectors C^T such that C^T*(P - I) = 0, where P = [ [p1, p2, p3, p4], [p1, p2, p3, p4], [p1, p2, p3, p4], [p1, p2, p3, p4] ] ?

    – DomJack Sep 01 '14 at 07:05
  • I would determine the P matrix in a more general way as P = [ [p1, p2, p3, p4], [p5, p6, p7, p8], [p9, p10, p11, p12], [p13, p14, p15, p16] ] and I'm looking for the symbolic vector C^T = [pp1, pp2, pp3, pp4], for which 0 <= ppi <= 1 and pp1 + pp2 + pp3 + pp4 = 1. – Моше Шуцерман Sep 03 '14 at 13:59
  • In that case, you just want to find the left-hand eigenvalues of P (or the right hand (normal) eigenvalues of P^T). If 1 is an eigenvalue, then the solution c is just the eigenvector associated with that eigenvalue. If 1 is not an eigenvalue, the only solution to c^T*(P - I) = 0 is the trivial one (c = 0).

    If you're using matlab, consult the eigs documentation.

    – DomJack Sep 05 '14 at 01:26