Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I'm really confused about what's going wrong with my call to FindInstance:

In[47]:= FindInstance[
           MatrixRank[{{0, 1, 1}, {1, 0, 1}, {(-1)^i1, 1, 0}}] == 3, 
           {i1}, Integers]

Out[47]:={{i1 -> 33}}

The matrix {{0,1,1},{1,0,1},{-1,1,0}} has rank 2. Also when I repeat the above call with the MatrixRank function set equal to 2, FindInstance returns {}. What am I missing??

share|improve this question
1  
Try MatrixRank[{{0, 1, 1}, {1, 0, 1}, {(-1)^h, 1, 0}}] or MatrixRank[{{0, 1, 1}, {1, 0, 1}, {h, h, h}}] –  belisarius Apr 20 '12 at 18:46
    
Using the variable "h" instead of "i1" gave the same result. Replacing the last row with {h,h,h} also returned {h->33}, which in this case is true. –  Richard Apr 20 '12 at 18:51
1  
No :) , I mean "look at the calc result". The problem is not with FindInstance[], but previous. –  belisarius Apr 20 '12 at 18:53
    
Ah! The Matrix Rank is always evaluating to three and not factoring in the variable h. It makes sense why the code is not working properly now. Do you know why MatrixRank behaves this way or what I can do to fix it? Thanks! –  Richard Apr 20 '12 at 18:55
    
MatrixRank is not working as you expect for free symbols Try ** Clear[k]; MatrixRank[{{1, 1}, {1, k}}] k = 1; MatrixRank[{{1, 1}, {1, k}}]** –  belisarius Apr 20 '12 at 18:58
show 2 more comments

1 Answer

up vote 5 down vote accepted

The problem with MatrixRank used in this way is explained in the Help:

enter image description here

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.