# Gradient for the max function

• October 8th 2009, 12:10 AM
noschemer
Suppose $f(\vec{x})=\max_ix_i$. What is the gradient $\bigtriangledown f(\vec{x})=?$
If you were to graph max(x,y) on, say $-1\le x\le 1$, $-1\le y\le 1$ you would see sharp corners along the lines y= x and y= -x. Generally speaking, only "smooth" functions have derivatives.