>If I write
>1-1+1-1-1+1-...
>then this is the same as writing
>1+(-1)+1+(-1)+...
>so
>1-1+1-1-1+1-...=1+(-1)+1+(-1)+...
>but since addition is associative I can regroup the terms to
>get this
>(1-1)+(1-1)+(1-1)+...=1+((-1)+1)+((-1)+1)+((-1)+1)+...
>which gives
>0+0+0+...=1+0+0+0...
>so 0=1 You can check at
https://www.cut-the-knot.org/arithmetic/999999.shtml
that the same "sum" also equals 1/2.
>as far as I can see I've not done anything wrong,
Why do you think it is possible to regroup an infinite series?
> but my
>teacher says you can't regroup infinitely long sums in this
>way, why not?
Close your eyes, take a deep breath and try to change your mind set. The reason you can't regroup infinite series, in general, is exactly because sometimes you get results like 0 = 1.
You start with an assumption that a number could be somehow associated with 1-1+1-... and that usual arithmetic rules apply to infinite series. The identity 0 = 1 that you obtained proves your assumptions wrong.
Some sums, however, could be associated with unique numbers, and others allow regrouping of terms without changing the related number.
The former are known as convergent series, the latter is true for absolutely convergent series.