# Order of precedence for parallel operator

In electrical engineering the parallel operator || gives half the harmonic mean of two values. E.g.:

$$\R_1 \parallel R_2 \equiv \frac{1}{1/R_1+1/R_2} \$$

But how should you compute

$$\kR_1 \parallel R_2 + R_3 = \ ? \$$

Is there a commonly accepted order of precedence for the parallel operator?

References would be appreciated.

• What is the "k" all about - is it a typo? – Andy aka Sep 30 '18 at 18:28
• @Andyaka: k is a scalar constant – HKOB Sep 30 '18 at 18:29
• But is it needed for this question's clarity? Or does it muddy the water? – Andy aka Sep 30 '18 at 18:31
• Good question. I have no idea, so it gets a +1... – Stefan Wyss Sep 30 '18 at 18:32
• I always interpret the parallel operator as having a higher precedence than + or -, but lower than multiplication or division. That's my own rule, though. I don't think mathematicians consider the parallel operator to be an operator they've cared enough about which to make any rules, assuming they even are aware of it. And in electronics, context usually provides the needed knowledge to know, for sure. – jonk Sep 30 '18 at 18:38

It looks like the parallel operator is surprisingly common, and there are precedence rules defined by some sources, but not all.

MIT in their courseware suggest using it, and set exam questions on it. They provide no information regarding precedence in their lecture notes. They say the following, with no description of precedence.

This mathematical relationship comes up often enough that it actually has a name: the “parallel operator“,denoted by the symbol $$\\parallel\$$. When we say $$\x‖y\$$, it means $$\\frac{xy}{x+y}\$$

The university of Utah use it to analyse circuits in their course notes, and provide precedence information as follows:

In the absence of parentheses, the parallel operators act before the plus signs, just as multiplies act before the plus signs in a calculator expression. In the parlance of computer science, "the parallel operator binds more tightly than the plus operator."

Finally, this book also defines the operator, and provides precedence rules, in the same way when referring to the equation $$I = \frac{V_{in}}{R_1+R_2 \parallel R_3},$$

the parallel operator has precedence over the addition: $$\R_2 \parallel R_3\$$ is computed first and then added to $$\R_1\$$

Note that neither of the references that define precedence of the $$\\parallel\$$ operator with respect to addition do so with respect to multiplication.

As I have rarely come across this operator, I would make no assumptions regarding precedence, and use brackets to clear up any ambiguity. E.g.: $$I = \frac{V_{in}}{R_1+(R_2 \parallel R_3)}$$

• Thanks for a good answer with somewhat useful references. Though the references might not be the best sources, I'm accepting it for now, I am still hopeful that such an everyday operator has been or will be given a more full treatise elsewhere. PS: The Utah course note link did not work for me. – HKOB Dec 29 '18 at 11:13
• @HKOB, was really disappointed with amount of information regarding the parallel operator. There is a little more out there, but not as informative or reputable as the ones I listed. – rob Dec 29 '18 at 21:31
• @HKOB, Regarding the Utah link, if you paste the URL into the wayback machine, it should work (I saved that link to the wayback machine). Or try this link tinyurl.com/ydf29keo (A shortened version for this comment). If it works, let me know and I'll edit the answer to use the wayback machine version. – rob Dec 29 '18 at 21:57

There is no question of operator precedence here. $$\R2\$$ cannot be in series with $$\kR1\$$ and also in parallel with $$\R3\$$. There is some information missing from the equation and the only way to clarify the problem is to look at the schematic.

• Agreed - the parallel operator is a description of the circuit rather than a mathematical operator. – Peter Bennett Sep 30 '18 at 21:03
• "the only way to clarify the problem is to look at the schematic.", or use parenthesis. – Harry Svensson Dec 28 '18 at 10:10
• @HarrySvensson I should have clarified my statement. Without looking at the schematic we can't be sure where the parentheses should be placed, whether R3 is in series with R2 alone or in series with the parallel combination of R1 and R2. – Elliot Alderson Dec 28 '18 at 13:07

To start: $$\R_1||R_2 = \frac{1}{\frac{1}{R_1} + \frac{1}{R_2}} = \frac{R_1 R_2}{R_1 + R_2}\$$

Then: $$\(kR_1)||R_2 = \frac{1}{\frac{1}{k R_1} + \frac{1}{R_2}} = \frac{1}{\frac{kR_1 + R_2}{kR_1R_2}} = \frac{kR_1R_2}{kR_1 + R_2}\$$

Which is not equal to: $$\k(R_1||R_2) = k\frac{R_1R_2}{R_1 + R_2}\$$

So order definitely matters, but as mentioned in the comments $$\||\$$ is not really an operator per se. I'd recommend sticking with parentheses to indicate order of operations and avoid ambiguity.

$$\R_1 || (R_2 + R_3) = \frac{R_1(R_2 + R_3)}{R_1 + R_2 + R_3} \neq (R_1 || R_2) + R_3 = \frac{R_1R_2}{R_1 + R_2} + R_3\$$