I guess what the OP means is that he wants a set of basis vectors with 
non-negative entries. For instance in the above example, adding the third 
row to the first will give such a matrix.

I don't know if there is any ready made method for doing that. An easy way 
would be to get the rref (the example given is already in rref form) and 
then try to remove the non-negative entries in any row, say r_1, by 
replacing the row with r_1+a*r_i for any possible i, and some scalar a. 
Starting from the bottom row (that is turning the bottom row into a 
non-negative vector, and then the 2nd last row, etc) would be a good way to 
proceed IMHO.

On Tuesday, April 24, 2012 9:44:45 PM UTC+8, Jason Grout wrote:
>
> On 4/24/12 8:36 AM, Doaa El-Sakout wrote:
> > Hi
> >
> > I am using right_kernel to find a kernel, for example the result is
> > [ 1  0  1  0 -1  0  0]
> > [ 0  1  1  0  0  0  0]
> > [ 0  0  0  1  1  0  0]
> > [ 0  0  0  0  0  1  1]
> >
> > How can I (for an arbitrary kernel) get positive entries only,
> > by making a linear combination of rows?
>
> I'm not quite sure what you're asking.  When you use right_kernel, you 
> get a vector space, not a matrix.  What types of matrices are you 
> dealing with (matrices with rational entries?)?  If you're dealing with 
> matrices having rational entries, then since the kernel is a subspace, 
> the kernel will have vectors with negative entries.
>
> Thanks,
>
> Jason
>

-- 
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to