Producing a matrix class that supports any size
Remove all var. Doesn't the book show for...yield by that point? For example:

(i,j) =&gt; { 
  var sum = 0.0; 
  for (k &lt;- matrix(i).indices) sum += matrix(i)(k) * another(k)(j); 
  sum 
}


Can be replaced with:

(i,j) =&gt; (for (k &lt;- matrix(i).indices) yield matrix(i)(k) * another(k)(j)).sum


The var on toString can be replaced by using mkString. I'll let you work out for yourself how to do that, now that I called your attention to that method. And, yes, it that method works on Array as well, though it doesn't appear on Scaladoc for Scala up to 2.9.2 because it is added implicitly. I suggest you use the nightly scaladoc to look things up -- the documentation there is better, though it may show things not available on release versions, and so is the tool itself.