# algebra precalculus – Is the distributive law of mutiplication valid when the number of terms are variable?

In brief the distributive law for natural numbers states that:

Let $$a$$,$$b$$,$$c$$ naturals then $$a cdot (b+c) = acdot b + acdot c$$

And this could be generalized by induction:

Let $$a, a_1, a_2, ldots a_n$$ naturals then $$acdot (a_1 + a_2 + ldots +a_n) = a cdot a_1 + acdot a_2 + ldots +acdot a_n$$

Those are valid propierties with other objects, for example, integers, real numbers, complex numbers, matrices, functions, etc. because their definition is based on this.

But what happens when $$n$$ is not a fixed natural but a variable? I’m interested in this because I want to know if the following is valid:

Let $$N$$ be a natural number, then:
$$N = overbrace{1+1+ldots +1}^{N- times}$$ and multiplying by N on the left in both sides of the equality we get $$Ncdot N = N cdot(overbrace{1+1+ldots +1}^{N- times})$$ now the left hand side becomes $$N^2$$ and until this point I agree this is valid. But I’m not sure that $$N cdot(overbrace{1+1+ldots +1}^{N- times}) = overbrace{N + N + ldots + N}^{N- times}$$ becasue this will bring a contradiction if we think this as a function. $$N^2 = overbrace{N + N + ldots + N}^{N- times}$$ and derive both side with respect to N $$frac{d}{dN}(N^2) = frac{d}{dN}left((overbrace{N + N + ldots + N}^{N- times})right) \ 2N = overbrace{1 + 1 + ldots + 1}^{N-times} = N$$

And clearly the function $$N$$ is not equal to the function $$2N$$, hence a contradiction

I’m sure that the distributive law is failing with the derivative operator, but I’m not sure with the multiplication operator.

Being more specific:
if $$c$$ is a constant and $$v$$ a variable is the following assertion valid?
$$overbrace{ c + c +c ldots +c }^{v -text{times}} =^{?} c cdot(overbrace{1+1+cdot+1}^{ v-text{times}})$$