Principles existed before the creation of the universe. The universe is created with these non material principles.
Geometry is discovered underlying the material structures we see. We didn't invent it. If we travel to Mars or the end of the universe, those principles are still there. Where could they not be? They are not destroyed even if the universe disappeared.
We can discover these principles because they are in divine consciousness, and we are an expression of that eternal awareness.