When will 1 thread run faster than multiple threads run concurrently
<p>For an assignment I must implement a Java program that when run with multiple threads is actually slower than with just 1.  I understand that creating a thread takes some overhead but in this example I am dealing with a large array 20,000x20,000.  There are no dependencies so the benefits of creating 4 smaller chunks and running them concurrently should always out way the cost of creating a thread right?</p>

<pre><code>for (int i = 0; i &lt; numThreads; i++) {

// for each iteration of the body's for loop,
// calculate the starting and ending indexes
// of the ith chunk of the y dimension of
// the anArray array
final int indexStart = i * chunkSize;
final int indexEnd = (i + 1) * chunkSize;

// each "execute" method of the Executor class
// creates a new object of type Runnable ...
// be careful with the parentheses here ... the
// entire next code block is being passes
// as a parameter to the execute method
ex.execute(new Runnable() {

    // The run() method is declared abstract in the Runnable
    // class, so it MUST be overriden. The body of the
    // run method is the "code" that each thread executes
    @Override
    public void run() {

        for (int j=0; j&lt;anArray.length; j++){
        for (int k = indexStart; k &lt; indexEnd; k++){
                            anArray[j][k] = anArray[j][k] * anArray[j][k] / 3.45 * Math.sqrt(anArray[j][k]);

                        }

        } // end for

    } // end run
    }
    );
}
</code></pre>

<p>our task is to modify only the innermost for loop we can do what ever we want in there but it has to make the runtime slower when executed with more threads.  with an upper limit of 8 threads.
My real question is what can cause more over head when implementing multiple threads.  I have done some research and found that you can use most of the cpu with a single thread so creating more wont help, how is this possible.</p>