Mathematics of space