# Partial derivative of a point - is that a vector?

I'm reading a graphics book and this passage is unclear to me (I'm relatively a newbie with linear algebra so I might miss some notions)

Basically the problem here is: I have a transformation and a left-handed coordinate system. This transformation might flip the Z axis thus rendering the left-handed system to a right-handed one. This is bad because we have a vector (the normal vector to a surface) that ends up to be flipped because we calculate it as the cross product between the derivative of the point p we are considering on the surface with respect to the u parametric coordinate of the surface and the derivative of the point p with respect to the v parametric coordinate.

There are some things I don't understand: what does it mean in the formula S(1,1,-1) dp/du ? Is it applying the transformation to the partial derivative or what? And how can I calculate the cross product between two partial derivatives of a point with respect to a coordinate? Is the derivative of a point a vector?

Edit: I figured out that S(1,1,-1) is a simple scale matrix, but I can't understand the passage and where does the S(-1,-1,1) come

The notation $S(1,1,-1)$ is being used to denote a transformation matrix, in this case a scale matrix that (should) be represented by $\begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1\end{pmatrix}$.

When multiplying this by the vector $\frac{\partial p}{\partial u}$, you get another vector (i.e. matrix-vector multiplication yields a vector).

They're basically showing that applying the scale transform to each vector $\frac{\partial p}{\partial u}, \frac{\partial p}{\partial v}$, you have to account for it twice when computing your normal!

So if normally your normal vector is

$$n = \frac{\partial p}{\partial u} \times \frac{\partial p}{\partial u},$$

the normal from the scaled vectors is

\begin{align*} n &= \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1\end{pmatrix}\frac{\partial p}{\partial u} \times \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & -1\end{pmatrix}\frac{\partial p}{\partial u} \\ &= \begin{pmatrix} -1 & 0 & 0 \\ 0 & -1 & 0 \\ 0 & 0 & 1\end{pmatrix} \frac{\partial p}{\partial u} \times \frac{\partial p}{\partial u} \end{align*}

(Note, we use the cross product property that $(Ax)\times (Ay) = \det A \cdot (A^T)^{-1} x\times y$.)

• Thank you!! The last cross product property totally wasn't known to me, thanks!! – Marco A. Feb 22 '13 at 11:42