I am trying to solve a simple maximization problem in Mathematica, using matrix and vector notation.
myVect = {{x}, {y}}
offDiag = {{0, 1}, {1, 0}}
Maximize[{0.5*Transpose[myVect].offDiag.myVect,
Transpose[myVect].{{2}, {2}} - 1 == 0}, {myVect}]
So I'm just trying to maximize the area of a rectangle with the circumference of 1, using this notation (I'll need it for more complex problems later). However, I get this error message:
Maximize::ivar: {{x},{y}} is not a valid variable. >>
Both the objective function and the equality constraint by themselves seem to work. What am I doing wrong? Is this a syntax error?