Description: NCXRepresent[aListOfExpressions,aListOfVariables, aListOfDims,aListOfFunctions,aListOfExraRules] replaces each occurrence of the variables in the listaListOfVariables with a matrix in commuting symbols of size specified in aListOfDims in the setof relations in the first arguement. The argument aListOfDims should be a list of pairs{n1,n2} specifying the number of rows and columns of the corresponding variable. Thefourth arguement is best described by an example. If one has the variable x and also theindeterminate F[x], then often one wants the F[x] to be replaced by a symbolic matrix aswell as x. If F appears in the fourth list, every occurrence of indeterminates F[x],F[y]etc. will be replaced by matrices of the same size as x,y etc. with entries that looklike Fx11,…,Fy11,…. This clearly is not appropriate for functions such as Aj and Tpdenoting the adjoint and transpose of a symbol. But for other functions such as Invthis is quite necessary. The output of NCXRepresent is a matrix for each relation inaListOfExpressions.
The last (fifth) arguement is a sort of catch-all for unusual rules specific to the problem. Thefollowing are some favorites.
z → IdentityMatrix[n]. If some variable z is to be replaced by an identity matrixof some size then one puts this rule in aListOfExtraRules An important point: ifconstants appear in the list of relations, one MUST replace them with auxiliary variablesand then use this last arguement to replace them with the appropriate multiple of theidentity matrix.
x → PrimeMat[{n1,n2},k]. This is an auxillary function built in to NCXRepresentthat will replace a variables by a matrix consisting of distinct prime entries. To use this,one just puts the rule above in the list aListOfExtraRules. This will replace x withan n1× n2matrix with prime entries beginning at the kth prime.
Any other replacement rules may be listed in aListOfExtraRules, such as tp →Transpose or other hand-made rules replacing a variable by some specific matrix.
Comments / Limitations: If aListOfExpressions includes constant terms, one must first replacethem with a variable and then use the optional list of rules to replace them with identitymatrices of appropriate size. Mathematica does bad things to expressions that contain botha matrix and a constant, namely it adds the constant to each entry of the matrix. Any of thelists other than aListOfExpressions may be left as the empty set. A warning: if a variableappears only as the arguement in a function in aListOfFunctions one must still put thevariable in the second arguement, and its size in the third. The reason is, its size must bespecified somewhere for the function to work. aListOfVariables should include only thosevariables that are to be replaced by purely symbolic matrices, and should not appear in theleft-hand side of a rule in aListOfOptionalRules.