I have the following matrix
{{a^2 + b + \[Sqrt](m + n) + 5, 23 x + 7 a}, {14 b,
a^2 + b + \[Sqrt](m - n) + 5}}
I want to replace the expressions a^2 + b + \[Sqrt](m + n) + 5 by $A$ and a^2 + b + \[Sqrt](m - n) + 5 by $B$, not by hand, but by letting Mathematica to do it for me.
ReplaceAll: e.g.mat /. {a^2 + b + \[Sqrt](m + n) + 5 -> A, a^2 + b + \[Sqrt](m - n) + 5 -> B}? – kglr Aug 03 '18 at 06:42A = mat[[1, 1]]; B = mat[[2, 2]];? – kglr Aug 03 '18 at 06:44