You can use a Generators > "Hilbert 3d" node to make the matrix. I'll use this for brevity. Either that or stack a few subdivided planes and join them with Mesh Join.
Each point on the matrix is a Vector, you wanted to check the distance between each vector and the origin vector (0,0,0) and use that distance to scale a sphere placed on that vector point.
here's how to make a more dynamic matrix
import the Gist from the SV import/export panel https://gist.github.com/c0f658e5dab427711f58c1908d470c64