Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Try MatrixRank[{{0, 1, 1}, {1, 0, 1}, {(-1)^h, 1, 0}}] or MatrixRank[{{0, 1, 1}, {1, 0, 1}, {h, h, h}}] – Dr. 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
No :) , I mean "look at the calc result". The problem is not with FindInstance[], but previous. – Dr. 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}}]** – Dr. belisarius Apr 20 '12 at 18:58
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

Your Answer


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.