If ` y = f(x) `, then we have the differential

`
dy = f'(x) dx
`

where `f'(x)` is the derivative of y with respect to x. Thus, we have (for the case when `dx` not equal to zero),

`
dy/dx = f'(x)
`

so that the derivative is a ratio of differentials. Note that we don't have to worry about `dx` equalling zero because we only consider the limiting case as `dx` `goes` toward zero.

These do indeed follow canceling rules as well (this is a touch mathy). Suppose we have `y = f(x)`, where `f` is continuous then `x = f`^{-1}(y) (the inverse of f, which is also continuous). Let's let `g = f`^{-1}. Consider the slope of the secant line between a point `(y,g(y))` and another point `(b,g(b))`. The slope is given by:

`
g(y) - g(b)`

-----------

y - b

`g(y)` is some `x` and we will have `g(b) = a`. We then take the limit as `y` goes to b, which gives `g'(b)` Since f and g are continuous we can write the above as

`
x - a `

-----------

f(x) - f(a)

In the limit as `x` goes to `a`. We have used the fact that `g` and `f` are inverses of each other. We then use the limit laws so that:

`
x - a 1 `

----------- = -----------------

f(x) - f(a) (f(x)-f(a))/(x-a)

In the limit as `x` goes to `a`

`
1 `

----

f'(a)

And thus, `g'(b)f(a) = 1`, or equivalently, we can state (since `f(a)` = b and we can easly extend these to any such `x` and `y`)

`
dy dx`

-- -- = 1

dx dy

The difference above is that those derivatives are partial derivatives (that is, derivatives of a functions of more than one variable while holding one variable constant in which we cannot treat the derivatives as ratios of differentials.

Of course this is in the case where `f'(x)` does not equal zero.