What is a mathematical structure?. So I'm a novice to abstract algebra and topology and I've just started trying to learn what an isomorphism is however I only think I  understand the defintion of order isomorphism.
What i don't grasp is how an isomorphism is not defined exactly the definitions online  seem to  change between mathematical structures.so for example an order isomorphism between 2 ordered set $(X,\leq)$ and $(Y,\leq)$ is  a bijective order preserving function that preserves all the properties of the order relation.
However what I don't understand is the term mathematical structure for example I read that $(X,R)$ where $R$ is a endorelation is a relational structure. But is it then not a mathematical structure can it not have an isomorphism?.
 A: Isomorphisms do in fact make sense for relational structures, and an extremely broad notion of isomorphism is provided by model theory (extending that provided by universal algebra, which handles operational structures). Specifically:

*

*A structure (more precisely: first-order structure) $\mathfrak{X}$ is a set $X$ equipped with some finite-arity relations and functions. Generally $X$ is required to be nonempty, but this isn't a huge issue here. The relations and functions involved are also labelled in an appropriate way, and the set of labels of the structure is called the structure's signature. For a symbol $S$ in the signature of $\mathfrak{X}$, we write "$S^\mathfrak{X}$" for the function/relation on $X$ corresponding to $S$.


*Given two structures $\mathfrak{A},\mathfrak{B}$ in the same signature $\Sigma$ with underlying sets $A,B$, an isomorphism $f:\mathfrak{A}\cong\mathfrak{B}$ is a bijection from $A$ to $B$ such that

*

*for each $n$-ary relation symbol $R$ in the signature $\Sigma$ and each tuple $(a_1,...,a_n)\in A^n$ we have $$R^\mathfrak{A}(a_1,...,a_n)\iff R^\mathfrak{B}(f(a_1),...,f(a_n)),$$ and


*for each $n$-ary function symbol $F$ in the signature $\Sigma$ and each tuple $(a_1,...,a_n)\in A^n$ we have $$f(F^\mathfrak{A}(a_1,...,a_n))=F^\mathfrak{B}(f(a_1), ..., f(a_n)).$$
For example, linear orders can be thought of as structures in a signature consisting of a single binary relation symbol $\triangleleft$. The relevant notion of an isomorphism between linear orders $(A,\triangleleft^\mathfrak{A})$ and $(B,\triangleleft^\mathfrak{B})$ is - as expected - a bijection $f:A\rightarrow B$ such that $x\triangleleft^\mathfrak{A}y\iff f(x)\triangleleft^\mathfrak{B}f(y)$.
There are various ways to generalize the notion of first-order structure. Most obviously, we can introduce sorts (this actually isn't really that different foundationally, since there isn't much distinguishing sorts from unary predicates until we look at more technical questions) or allow functions/relations to have infinite or even unbounded arities (this winds up resulting in a very nasty general theory, but still makes perfect sense at a foundational level). The notion of isomorphism similarly generalizes directly. For example, if we construe topological spaces as two-sorted structures (sorts being points and open sets) with an unbounded-arity operation on the set sort (arbitrary union) and a binary relation (elementhood) connecting the two sorts themselves, the resulting notion of isomorphism coincides exactly with homeomorphism.
A: There is a whole theory of structures in logic, but I'll try to give a quick working mathematician's version.  A structure consists of one or more sets, zero or more functions between those sets, zero or more relations and predicates on those sets, zero or more constants chosen from those sets, and zero or more properties that these data all need to satisfy.
For example, a poset is consists of

*

*a set $X$.

*a binary relation on $X$ (which I guess is also known as an endorelation on $X$).  Call it $\leq$ for this definition.

*the fact that $\leq$ is reflexive, antisymmetric, and transitive.

We usually write the data of a structure as a tuple.  In the case of posets, we might write that $(X,\leq)$ is a poset to say that $X$ is the set and $\leq$ is the relation.
The idea of an isomorphism of structures is a collection of bijections of all the sets under consideration with the property that they "preserve" the functions, relations, predicates, and constants.
In the case of posets, if $(X,\leq)$ and $(Y,\preceq)$ are posets, then an isomorphism between them consists of a bijection $f:X\to Y$ and the property that for all $x_1,x_2\in X$, then
$$x_1\leq x_2 \text{ if and only if } f(x_1)\preceq f(x_2).$$
The theory of mathematical structures is what lets you know how to come up with the definition of an isomorphism for any given structure.  Here's another structure: a semigroup consists of

*

*a set $S$

*a function $\mu : S\times S\to S$ called multiplication

*the fact that for all $x,y,z\in S$, then $\mu(x,\mu(y,z))=\mu(\mu(x,y),z)$ ("associativity").

If $(S,\mu)$ and $(S',\mu')$ are both semigroups, then an isomorphism would be a bijective function $f:S\to S'$ such that for all $x,y\in S$,
$$f(\mu(x,y)) = \mu'(f(x), f(y)).$$
