Stop your formulas from breaking by switching from grid-based coordinates (ROW) to stable table measurements (ROWS).
Then to optimize over that linear model they’ll show you gradient descent, and again you’ll note, “Well, that’s just calculus!” Support vector machines? Merely convex optimization. Naive Bayes? Just ...