When some object X is said to be embedded in another object Y, the embedding is given by some injective and structure-preserving map f : X → Y. The precise meaning of "structure-preserving" depends on the kind of mathematical structure of which X and Y are instances. In the terminology of category theory, a structure-preserving map is called a morphism.
The fact that a map f : X → Y is an embedding is often indicated by the use of a "hooked arrow" ( U+21AA ↪ RIGHTWARDS ARROW WITH HOOK);  thus: (On the other hand, this notation is sometimes reserved for inclusion maps.)
Given X and Y, several different embeddings of X in Y may be possible. In many cases of interest there is a standard (or "canonical") embedding, like those of the natural numbers in the integers, the integers in the rational numbers, the rational numbers in the real numbers, and the real numbers in the complex numbers. In such cases it is common to identify the domain X with its image f(X) contained in Y, so that f(X) ⊆ Y.
In general topology, an embedding is a homeomorphism onto its image.  More explicitly, an injective continuous map between topological spaces and is a topological embedding if yields a homeomorphism between and (where carries the subspace topology inherited from ). Intuitively then, the embedding lets us treat as a subspace of . Every embedding is injective and continuous. Every map that is injective, continuous and either open or closed is an embedding; however there are also embeddings which are neither open nor closed. The latter happens if the image is neither an open set nor a closed set in .
For a given space , the existence of an embedding is a topological invariant of . This allows two spaces to be distinguished if one is able to be embedded in a space while the other is not.
In differential topology: Let and be smooth manifolds and be a smooth map. Then is called an immersion if its derivative is everywhere injective. An embedding, or a smooth embedding, is defined to be an injective immersion which is an embedding in the topological sense mentioned above (i.e. homeomorphism onto its image). 
In other words, the domain of an embedding is diffeomorphic to its image, and in particular the image of an embedding must be a submanifold. An immersion is precisely a local embedding, i.e. for any point there is a neighborhood such that is an embedding.
When the domain manifold is compact, the notion of a smooth embedding is equivalent to that of an injective immersion.
An important case is . The interest here is in how large must be for an embedding, in terms of the dimension of . The Whitney embedding theorem  states that is enough, and is the best possible linear bound. For example, the real projective space RPm of dimension , where is a power of two, requires for an embedding. However, this does not apply to immersions; for instance, RP2 can be immersed in as is explicitly shown by Boy's surface—which has self-intersections. The Roman surface fails to be an immersion as it contains cross-caps.
An embedding is proper if it behaves well with respect to boundaries: one requires the map to be such that
- , and
- is transverse to in any point of .
The first condition is equivalent to having and . The second condition, roughly speaking, says that f(X) is not tangent to the boundary of Y.
In Riemannian geometry and pseudo-Riemannian geometry: Let (M, g) and (N, h) be Riemannian manifolds or more generally pseudo-Riemannian manifolds. An isometric embedding is a smooth embedding f : M → N which preserves the (pseudo-) metric in the sense that g is equal to the pullback of h by f, i.e. g = f*h. Explicitly, for any two tangent vectors we have
Analogously, isometric immersion is an immersion between (pseudo)-Riemannian manifolds which preserves the (pseudo)-Riemannian metrics.
In general, for an algebraic category C, an embedding between two C-algebraic structures X and Y is a C-morphism e : X → Y that is injective.
The kernel of σ is an ideal of E which cannot be the whole field E, because of the condition σ(1) = 1. Furthermore, it is a well-known property of fields that their only ideals are the zero ideal and the whole field itself. Therefore, the kernel is 0, so any embedding of fields is a monomorphism. Hence, E is isomorphic to the subfield σ(E) of F. This justifies the name embedding for an arbitrary homomorphism of fields.
- is injective,
- for every -ary function symbol and we have ,
- for every -ary relation symbol and we have iff
Here is a model theoretical notation equivalent to . In model theory there is also a stronger notion of elementary embedding.
Injectivity of F follows quickly from this definition. In domain theory, an additional requirement is that
- is directed.
for some constant .
An important special case is that of normed spaces; in this case it is natural to consider linear embeddings.
One of the basic questions that can be asked about a finite-dimensional normed space is, what is the maximal dimension such that the Hilbert space can be linearly embedded into with constant distortion?
The answer is given by Dvoretzky's theorem.
In category theory, there is no satisfactory and generally accepted definition of embeddings that is applicable in all categories. One would expect that all isomorphisms and all compositions of embeddings are embeddings, and that all embeddings are monomorphisms. Other typical requirements are: any extremal monomorphism is an embedding and embeddings are stable under pullbacks.
Ideally the class of all embedded subobjects of a given object, up to isomorphism, should also be small, and thus an ordered set. In this case, the category is said to be well powered with respect to the class of embeddings. This allows defining new local structures in the category (such as a closure operator).
In a concrete category, an embedding is a morphism ƒ: A → B which is an injective function from the underlying set of A to the underlying set of B and is also an initial morphism in the following sense: If g is a function from the underlying set of an object C to the underlying set of A, and if its composition with ƒ is a morphism ƒg: C → B, then g itself is a morphism.
A factorization system for a category also gives rise to a notion of embedding. If (E, M) is a factorization system, then the morphisms in M may be regarded as the embeddings, especially when the category is well powered with respect to M. Concrete theories often have a factorization system in which M consists of the embeddings in the previous sense. This is the case of the majority of the examples given in this article.
As usual in category theory, there is a dual concept, known as quotient. All the preceding properties can be dualized.
An embedding can also refer to an embedding functor.
- Closed immersion
- Dimension reduction
- Johnson–Lindenstrauss lemma
- Universal space
- Spivak 1999, p. 49 suggests that "the English" (i.e. the British) use "embedding" instead of "imbedding".
- "Arrows – Unicode" (PDF). Retrieved 2017-02-07.
- Hocking & Young 1988, p. 73. Sharpe 1997, p. 16.
- Bishop & Crittenden 1964, p. 21. Bishop & Goldberg 1968, p. 40. Crampin & Pirani 1994, p. 243. do Carmo 1994, p. 11. Flanders 1989, p. 53. Gallot, Hulin & Lafontaine 2004, p. 12. Kobayashi & Nomizu 1963, p. 9. Kosinski 2007, p. 27. Lang 1999, p. 27. Lee 1997, p. 15. Spivak 1999, p. 49. Warner 1983, p. 22.
- Whitney H., Differentiable manifolds, Ann. of Math. (2), 37 (1936), pp. 645–680
- Nash J., The embedding problem for Riemannian manifolds, Ann. of Math. (2), 63 (1956), 20–63.
- Bishop, Richard Lawrence; Crittenden, Richard J. (1964). Geometry of manifolds. New York: Academic Press. ISBN 978-0-8218-2923-3.
- Bishop, Richard Lawrence; Goldberg, Samuel Irving (1968). Tensor Analysis on Manifolds (First Dover 1980 ed.). The Macmillan Company. ISBN 0-486-64039-6.
- Crampin, Michael; Pirani, Felix Arnold Edward (1994). Applicable differential geometry. Cambridge, England: Cambridge University Press. ISBN 978-0-521-23190-9.
- do Carmo, Manfredo Perdigao (1994). Riemannian Geometry. ISBN 978-0-8176-3490-2.
- Flanders, Harley (1989). Differential forms with applications to the physical sciences. Dover. ISBN 978-0-486-66169-8.
- Gallot, Sylvestre; Hulin, Dominique; Lafontaine, Jacques (2004). Riemannian Geometry (3rd ed.). Berlin, New York: Springer-Verlag. ISBN 978-3-540-20493-0.
- Hocking, John Gilbert; Young, Gail Sellers (1988) . Topology. Dover. ISBN 0-486-65676-4.
- Kosinski, Antoni Albert (2007) . Differential manifolds. Mineola, New York: Dover Publications. ISBN 978-0-486-46244-8.
- Lang, Serge (1999). Fundamentals of Differential Geometry. Graduate Texts in Mathematics. New York: Springer. ISBN 978-0-387-98593-0.
- Kobayashi, Shoshichi; Nomizu, Katsumi (1963). Foundations of Differential Geometry, Volume 1. New York: Wiley-Interscience.
- Lee, John Marshall (1997). Riemannian manifolds. Springer Verlag. ISBN 978-0-387-98322-6.
- Sharpe, R.W. (1997). Differential Geometry: Cartan's Generalization of Klein's Erlangen Program. Springer-Verlag, New York. ISBN 0-387-94732-9..
- Spivak, Michael (1999) . A Comprehensive introduction to differential geometry (Volume 1). Publish or Perish. ISBN 0-914098-70-5.
- Warner, Frank Wilson (1983). Foundations of Differentiable Manifolds and Lie Groups. Springer-Verlag, New York. ISBN 0-387-90894-3..
- Adámek, Jiří; Horst Herrlich; George Strecker (2006). Abstract and Concrete Categories (The Joy of Cats).
- Embedding of manifolds on the Manifold Atlas