Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Why can't Mathematica 9 simplify mol/L to M, when it can simplify M*L to mol?

 Quantity["Moles" / "Liters"] // UnitSimplify
 (* => 1 mol/L *)

 Quantity["Molar" * "Liters"] // UnitSimplify
 (* => 1 mol *)

And is there a way to fix this behaviour?

share|improve this question
3  
Perhaps this is because molar is not in the base SI system and mole is? – Sjoerd C. de Vries Aug 21 '13 at 22:07
    
@Sjoerd: I'm not sure if the base vs non-base unit is the issue here. The example in the documentation is UnitSimplify[Quantity[1, ("Joules"/"Seconds")]] which yields the non-base SI Quantity[1, "Watts"]. – Simon Oct 13 '13 at 12:12

I can't comment on whether this functionality is by design or by omission; however, to fix this behavior, one can use UnitConvert

Quantity["Moles" / "Liters"] // UnitSimplify
UnitConvert[%,"Molar"]

(* 1 mol/L *)
(* 1 M *)
share|improve this answer
    
Also, there's no problem doing calculations like Quantity[3, "Moles"/"Liters"] - Quantity[1, "Molar"] – JasonB Jul 22 at 19:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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