2 of 2 added 152 characters in body

Julia, 9 3 bytes

eye

This is just a built-in function that accepts an integer n and returns an nxn Array{Float64,2} (i.e. a 2D array). Call it like eye(n).

Note that submissions of this form are acceptable per this policy.