# Trouble using FindInstance with MatrixRank

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??

-
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