Search code examples
matrixsolverequation-solvingmathematica-8

Solving a nonlinear system of matrices using Mathematica


I am trying to find solutions to nonlinear systems of matrix equations with Mathematica. The solution space is too complicated to try to use Solve, and thus I have tried to use FindInstance. Here is this simplest example of a nonlinear system that I am trying to find a solution for:

T + A + C + CBA = 0
I - A - C - ABC = 0

where A, B, C are any matrices, Det[T] = 1, and I is the identity matrix with dimension of 2x2. I also want all matrices to have only integer entries. I am using the command

FindInstance[{T + a + c + c.b.a == z, IdentityMatrix[2] - a - c - 
    a.b.c == z, Det[T]==1} , Integers]

where z is the zero matrix. However, every time I do so it responds with "FindInstance::exvar: The system contains a nonconstant expression a independent of variables {Integers}."

Retrying the command as

FindInstance[{T + a + c + c.b.a == z, 
   IdentityMatrix[2] - a - c - a.b.c == z, 
   Det[T] == 1}  /. {a -> {{1, 0}, {0, 1}}}, Integers]

returns "FindInstance::exvar: The system contains a nonconstant expression b independent of variables {Integers}."

How can I use FindInstance or Solve to find a solution to this system without finding the solution myself by fixing "independent variables?"


Solution

  • I discovered that I was having a syntax problem.

    The correct syntax to solve these matrix equations is the following:

    A = {{A11, A12}, {A21, A22}}
    
    B = {{B11, B12}, {B21, B22}}
    
    C = {{C11, C12}, {C21, C22}}
    
    T = {{T11, T12}, {T21, T22}}
    
    FindInstance[{T + A + C + C.B.A==0, IdentityMatrix[2] - A - C - A.B.C==0, Det[T]==1}, 
    {T11, T12, T21, T22, A11, A12, A21, A22, B11, B12, B21, B22, C11, C12, C21, C22}, 
    Integers]