Construct a Gaussian Matrix
Mathematica, 60 54 50 bytes
Thanks @GregMartin for 4 bytes!
Array[s=2#2^2;E^(-{##}.{##}/s)/π/s&amp;,1+2{#,#},-#]&amp;

Takes r and sigma as input, returns the matrix (exact numbers).
Built-in version (58 bytes)
GaussianMatrix[{##},Standardized-&gt;1&lt;0,Method-&gt;&quot;Gaussian&quot;]&amp;

Of course, Mathematica has a built-in for this, too, but it's too long.