While math may offer "optimal" theoretical options, reality is messier. Likely the most efficient for humans and simpler technique to dice onions is the street food vendor way:
https://youtu.be/qDFc-5Zc3HU
https://youtu.be/LOqwl2KTzd4