4
$\begingroup$

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

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

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

$\endgroup$
7
  • 1
    $\begingroup$ Try MatrixRank[{{0, 1, 1}, {1, 0, 1}, {(-1)^h, 1, 0}}] or MatrixRank[{{0, 1, 1}, {1, 0, 1}, {h, h, h}}] $\endgroup$ Commented Apr 20, 2012 at 18:46
  • $\begingroup$ 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. $\endgroup$
    – Richard
    Commented Apr 20, 2012 at 18:51
  • 1
    $\begingroup$ No :) , I mean "look at the calc result". The problem is not with FindInstance[], but previous. $\endgroup$ Commented Apr 20, 2012 at 18:53
  • $\begingroup$ 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! $\endgroup$
    – Richard
    Commented Apr 20, 2012 at 18:55
  • $\begingroup$ 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}}]** $\endgroup$ Commented Apr 20, 2012 at 18:58

1 Answer 1

5
$\begingroup$

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

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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