;Task:
Build an [[wp:identity matrix|identity matrix]] of a size known at run-time.
An ''identity matrix'' is a square matrix of size '''''n'' × ''n''''',
where the diagonal elements are all '''1'''s (ones),
and all the other elements are all '''0'''s (zeroes).
;Related tasks:
* [[Spiral matrix]]
* [[Zig-zag matrix]]
* [[Ulam_spiral_(for_primes)]]