Similar rules govern electrical components connected in series and in parallel as those known in the mechanical domain. These rules are derived using the fact that current is a through variable and that voltage is an across variable, along with Kirchoff's Current Law and Kirchoff's Voltage Law.
For N elements connected in series:

Since current is a through variable, the current in each element must be the same:
i = i1 = i2 = i3 = . . . = iNSince V is a relative voltage, or voltage change across an element, the total voltage change across the series is just a simple sum:
V = V1 + V2 + V3 + . . . + VNThe equation above can also be obtained by applying Kirchoff's Voltage Law to the loop made by the voltmeter and the N elements ( V1 + V2 + V3 + . . . + VN-V=0). Notice that the rule for voltage across elements in series is similar to the velocity across elements in series in the mechanical domain.
For N elements connected in parallel:

Since the current into a junction must equal the current out of a junction (Kirchoff's Current Law):
i = i1 + i2 + i3 + . . . + iNSince V is the voltage change across the elements, and all elements are connected together at their ends (and thus must share a common potential at their ends), the voltages across all elements must be the same:
V = V1 = V2 = V3 = . . . = VNThe equation above can also be obtained by applying Kirchoff's Voltage Law to the loops around any two elements (eg, loop around element 1 and element 2 (V1-V2=0); or loop around element 1 and the voltmeter (V1-V=0)).
Examples:
What is the effective resistance of two resistors in series?

We know: i1 = i2= i , V1 = i R1, V2 = i R2, V = V1 + V2Thus: V = i R1 + i R2 = i (R1 + R2)
Thus: Rredbox = R1 + R2
What is the effective resistance of two resistors in parallel?

We know: i = i1 + i2, V1 = i R1, V2 = i R2, V = V1 = V2Thus: i = V/R1 + V/R2 = V*(1/R1 + 1/R2)
Thus: Rredbox = (1/R1 + 1/R2)-1