I have the following norm

Norm[{a, b*c}]

(* Sqrt[Abs[a]^2 + Abs[b c]^2] *)

How do I remove the Abs from it?

FullSimplify[Norm[{a, b*c}], Assumptions -> {a > 0, b > 0, c > 0}]

only kills the first Abs

Sqrt[a^2 + Abs[b c]^2]
up vote 12 down vote accepted
ComplexExpand@Norm@{a, b c}

Sqrt[a^2 + b^2 c^2]

  • 2
    Thx. Can you explain why ComplexEpxpand does it and Assumptions does not? – chr Sep 22 at 20:33
  • 2
    ComplexExpand automatically assumes all its variables to be real. Other than that, I believe it's just a matter of behind-the-scenes expression manipulation (i.e. I don't know...). Though this idea reminds me of this post talking about different ways of assuming things (granted in relation to Integrate). – That Gravity Guy Sep 22 at 20:48

If you have to use FullSimplify or Simplify, you can use the option ComplexityFunction to make expressions with Abs more costly:

FullSimplify[Norm[{a, b*c}], Assumptions -> {a > 0, b > 0, c > 0}, 
  ComplexityFunction -> (100 Count[#, _Abs, {0, Infinity}] +  LeafCount[#] &)]

 Sqrt[a^2 + b^2 c^2]

  • 3
    And the reason that ComplexityFunction is needed in this case is because LeafCount /@ {Sqrt[a^2 + Abs[b*c]^2], Sqrt[a^2 + b^2*c^2]} evaluates to {14, 15}, i.e., the apparent simpler form is not simpler. – Bob Hanlon Sep 22 at 23:30
  • 1
    @BobHanlon, great point. – kglr Sep 22 at 23:31

Also, for a real number x, Abs[x] = Sqrt[x^2]

Norm[{a, b*c}] /. Abs[x_] :> Sqrt[x^2]

(* Sqrt[a^2 + b^2 c^2] *)

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.