symmetric monoidal (∞,1)-category of spectra
For derivations in logic, see deduction.
For $A$ an algebra (over some ring $k$), a derivation on $A$ is a $k$-linear morphism
such that for all $a,b \in A$ we have
This identity is called the Leibniz rule; compare it to the product rule in ordinary calculus (first written down by Gottfried Leibniz).
For $A$ an algebra (over some ring $k$) and $N$ a bimodule over $A$, a derivation of $A$ with values in $N$ is a $k$-linear morphism
such that for all $a,b \in A$ we have
where on the dot on the right-hand side denotes the right (first term) and left (second term) action of $A$ on the bimodule $N$.
The previous definition is a special case of this one, where the bimodule is $N = A$, the algebra itself with its canonical left and right action on itself.
A special case is where $A$ is a group algebra $k G$ of a group $G$, and $N$ is a left $G$-module, regarded as a bimodule where the right action is trivial. Here a derivation is also called a 1-cocycle, as used in group cohomology.
A graded derivation of degree $p$ on a graded algebra $A$ is a degree-$p$ graded-module homomorphism $d: A \to A$ such that
whenever $a$ is homogeneous of degree $q$. (By default, the grade is usually $1$, or sometimes $-1$.)
An augmented derivation on an algebra $A$, augmented by an algebra homomorphism $\epsilon: A \to B$, is a module homomorphism $d: A \to B$ such that
If you think about it, you should be able to figure out the definition of an augmented graded derivation.
There are many further extensions, for examples derivations with values in an $A$-bimodule $M$ forming $Der_k(A,M) \subset Hom_k(A,M)$ (see also double derivation), skew-derivations in ring theory (with a twist in the Leibniz rule given by an endomorphism of a ring) and the dual notion of a coderivation of a coalgebra. The latter plays role in Koszul-dual definitions of $A_\infty$-algebras and $L_\infty$-algebras. See also derivation on a group, which uses a modified Leibniz rule: $d(a b) = d(a) + a d(b)$.
More generally, there is a notion of derivation for every kind of algebra over an operad over a dg-operad (at least).
Let $\mathcal{O}$ be a dg-operad (a chain complex-enriched operad). For $A$ an $\mathcal{O}$-algebra over an operad and $N$ a module over that algebra a derivation on $A$ with values in $N$ is a morphism
in the underlying category of graded vector spaces, such that for each $n \gt 0$ we have a commuting diagram
where the top horizontal morphism is that given by the $\mathcal{O}$-algebra structure of $A$ and the bottom that given by the $A$-module structure of $N$.
This appears as (Hinich, def. 7.2.1).
The theory of tangent complexes, Kähler differentials, etc. exists in this generality for derivations on algebras over an operad.
Another equivalent reformulation of the notion of derivations turns out to be useful for the vertical categorification of the concept:
for $N$ an $R$-module, there is the nilpotent extension ring $G(N) := N \oplus R$, equipped with the product operation
This comes with a natural morphism of rings
given by sending the elements of $N$ to 0. One sees that a derivation on $R$ with values in $N$ is precisely a ring homomorphism $R \to G(N)$ that is a section of this morphism.
In terms of the bifibration $p : Mod \to Ring$ of modules over rings, this is the same as a morphism from the module of Kähler differentials $\Omega_K(R)$ to $N$ in the fiber of $p$ over $R$.
While this is a trivial restatement of the universal property of Kähler differentials, it is this perspective that vastly generalizes:
we may replace $Mod \to Ring$ by the tangent (∞,1)-category projection $p : T_C \to C$ of any (∞,1)-category $C$. The functor that assigns Kähler differentials is then replaced by a left adjoint section of this projection
An $(\infty,1)$-derivation on an object $R$ with coefficients in an object $N$ in the fiber of $T_C$ over $R$ is then defined to be morphism $\Omega(R) \to N$ in that fiber.
More discussion of this is at deformation theory.
There should be some more clearly algebraic examples (other than obvious things like restricting the above to polynomials), but I don't know how to state them.
The standard example of a derivation not on an algebra, but with values in a bimodule is a restriction of the above case of the exterior differential acting on the deRham algebra of differential forms. Restricting this to 0-fomrs yields a morphism
where $\Omega^1(X)$ is the space of 1-forms on $X$, regarded as a bimodule over the algebra of functions in the obvious way.
A variation of this example is given by the Kähler differentials. These provide a universal derivation in some sense.
Let $X$ be a smooth manifold and $C^\infty(X)$ its algebra of smooth functions. Then the morphism
that sends a vector field $v$ to the derivation $v(-) : C^\infty(X) \to C^\infty(X)$ is a bijection.
See also at derivations of smooth functions are vector fields.
This is true because $C^\infty(X)$ satisfies the Hadamard lemma.
Since every smooth manifold is locally isomorphic to $\mathbb{R}^n$, it suffices to consider this case. By the Hadamard lemma every function $f \in C^\infty(\mathbb{R}^n)$ may be written as
for smooth $\{g_i \in C^\infty(X)\}$ with $g_i(0) = \frac{\partial f}{\partial x_i}(0)$. Since any derivation $\delta : C^\infty(X) \to C^\infty(X)$ satisfies the the Leibniz rule, it follows that
Similarly, by translation, at all other points. Therefore $\delta$ is already fixed by its action of the coordinate functions $\{x_i \in C^\infty(X)\}$. Let $v_\delta \in T \mathbb{R}^n$ be the vector field
then it follows that $\delta$ is the derivation coming from $v_\delta$ under $Vect(X) \to Der(C^\infty(X))$.
Let now $X$ be a topological manifold and $C(X)$ the algebra of continuous real-valued functions on $X$.
The derivations $\delta : C(X) \to C(X)$ are all tivial.
Observe that generally every derivation vanishes on the function 1 that is constant on $1 \in \mathbb{R}$. Therefore it is sufficient to show that if $f \in C(X)$ vanishes at $x_0 \in X$ also $\delta(f)$ vanishes at $x_0$, because we may write every function $g$ as $(g - g(x_0)) + g(x_0)$.
So let $f \in C(X)$ with $f(x_0) = 0$. Then we may write $f$ as a product
with
and
Notice that indeed both functions are continuous. (But even if $X$ is a smooth manifold and $f$ a smooth function, $g_1$ will in general not be smooth.)
But also both functions vanish at $x_0$. This implies that
Derivations on algebras over a dg-operad are discussed in section 7 of