# FindRoot of matrix operation equations

I have a question in FindRoot of matrix operation equations.

It's my first time use Matrix operation in FindRoot, i have write a simple example, it shows FindSolve can solve Matrix equations.

a = {{1, 2}, {3, 4}}; b = {{1, 3}, {2, 2}};

{c} /. FindRoot[
c == a.b - IdentityMatrix,
{c, IdentityMatrix}
]


Very fast and simple!

Can I write a new expression in FindRoot like

a = {{1, 2}, {3, 4}}; b = {{1, 3}, {2, 2}};
d = {{1, 1}, {3, 3}};
{c} /. FindRoot[
var == d.b,
c == a.var - IdentityMatrix,
{c, IdentityMatrix}
]


and return c and var, well, var is some function result I want update in FindRoot and used to the equation I want to solve like c == a.var. var isn't need to solve.

Above code have issues. Here is my idea:

a = {{1, 2}, {3, 4}}; b = {{1, 3}, {2, 2}};
d = {{1, 1}, {3, 3}};
{var = d.b, c /. FindRoot[
c == a.var - IdentityMatrix,
{c, IdentityMatrix}
]}


Can I achieve same result in a more compact form？Putting expressions (eg. var) that don't need to solve into FindRoot will cause errors.

• By the way, can I display the Math symbol more comfortable when I paste the code from notebook to this question?  [CapitalOmega] is not easy to reading.
– Ben
Nov 30, 2021 at 15:36
• It might be helpful if you show the matrixequation you try to solve ! Your first example seems to be unclear Nov 30, 2021 at 16:02
• q is not defined when the definition of qE0 refers to its parts. For your simple example, Solve works: c /. Solve[{c == a . b - IdentityMatrix, c \[Element] Matrices[{2, 2}]}, c][] Nov 30, 2021 at 16:25
• Nov 30, 2021 at 16:28
• Why not a.d.b - IdentityMatrix directively? There no equation in your examples indeed. Dec 1, 2021 at 0:16

a = {{1, 2}, {3, 4}}; b = {{1, 3}, {2, 2}};
d = {{1, 1}, {3, 3}};

With[{var = d . b},
c /. Solve[{c == a . var - IdentityMatrix,
c ∈ Matrices}, c][]]

(* {{20, 35}, {45, 74}} *)

With[{var = d . b},
c /. FindRoot[c == a . var - IdentityMatrix,
{c, IdentityMatrix}]]

(* {{20., 35.}, {45., 74.}} *)