0

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.

H. Kenan
  • 663
  • 6
  • 13
  • 1
    try 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:42
  • or, maybe, A = mat[[1, 1]]; B = mat[[2, 2]];? – kglr Aug 03 '18 at 06:44
  • Answers linked in this topic should address this problem: https://mathematica.stackexchange.com/q/3822/5478 – Kuba Aug 03 '18 at 06:50

0 Answers0