# Differentiable orthogonal 3D vector

Does anybody know a simple and differentiable function that converts a 3D vector u = (x, y, z) to another vector that is orthogonal to u.

To be more precise, I am looking for three differentiable functions {f, g, h} such that the vector u = (x, y, z) is orthogonal to v = (f(x,y,z), g(x,y,z), h(x,y,z)) and v is zero only if u is zero.

The functions {f, g, h} should be as simple as possible. I prefer them linear, but I think no such linear functions exist. Low degree polynomials are also good.

P.S. I found such functions, but they are not polynomials. For example:

f(x, y, z) = y*(exp(x) + 3) - z*(exp(x) + 2)
g(x, y, z) = z*(exp(x) + 1) - x*(exp(x) + 3)
h(x, y, z) = x*(exp(x) + 2) - y*(exp(x) + 1)


It's simply the cross product of (x,y,z) with (exp(x)+1, exp(x)+2, exp(x)+3). It satisfies all requirements except for being polynomials. But they are quite simple.

-