In mathematics, the adjective trivial is often used to refer to a claim or a case which can be readily obtained from context, or an object which possesses a simple structure (e.g., groups, topological spaces).   The noun triviality usually refers to a simple technical aspect of some proof or definition. The origin of the term in mathematical language comes from the medieval trivium curriculum, which distinguishes from the more difficult quadrivium curriculum.   The opposite of trivial is nontrivial, which is commonly used to indicate that an example or a solution is not simple, or that a statement or a theorem is not easy to prove. 
The judgement of whether a situation under consideration is trivial or not depends on who considers it since the situation is obviously true for someone who has sufficient knowledge or experience of it while to someone who has never seen this, it may be even hard to be understood so not trivial at all. And there can be an argument about how quickly and easily a problem should be recognized for the problem to be treated as trivial. So, triviality is not a universally agreed property in mathematics and logic.
In mathematics, the term "trivial" is often used to refer to objects (e.g., groups, topological spaces) with a very simple structure. These include, among others
"Trivial" can also be used to describe solutions to an equation that have a very simple structure, but for the sake of completeness cannot be omitted. These solutions are called the trivial solutions. For example, consider the differential equation
while a nontrivial solution is the exponential function
The differential equation with boundary conditions is important in mathematics and physics, as it could be used to describe a particle in a box in quantum mechanics, or a standing wave on a string. It always includes the solution , which is considered obvious and hence is called the "trivial" solution. In some cases, there may be other solutions ( sinusoids), which are called "nontrivial" solutions. 
Similarly, mathematicians often describe Fermat's last theorem as asserting that there are no nontrivial integer solutions to the equation , where n is greater than 2. Clearly, there are some solutions to the equation. For example, is a solution for any n, but such solutions are obvious and obtainable with little effort, and hence "trivial".
Trivial may also refer to any easy case of a proof, which for the sake of completeness cannot be ignored. For instance, proofs by mathematical induction have two parts: the "base case" which shows that the theorem is true for a particular initial value (such as n = 0 or n = 1), and the inductive step which shows that if the theorem is true for a certain value of n, then it is also true for the value n + 1. The base case is often trivial and is identified as such, although there are situations where the base case is difficult but the inductive step is trivial. Similarly, one might want to prove that some property is possessed by all the members of a certain set. The main part of the proof will consider the case of a nonempty set, and examine the members in detail; in the case where the set is empty, the property is trivially possessed by all the members of the empty set, since there are none (see vacuous truth for more).
The judgement of whether a situation under consideration is trivial or not depends on who considers it since the situation is obviously true for someone who has sufficient knowledge or experience of it while to someone who has never seen this, it may be even hard to be understood so not trivial at all. And there can be an argument about how quickly and easily a problem should be recognized for the problem to be treated as trivial. The following examples show the subjectivity and ambiguity of the triviality judgement.
Triviality also depends on context. A proof in functional analysis would probably, given a number, trivially assume the existence of a larger number. However, when proving basic results about the natural numbers in elementary number theory, the proof may very well hinge on the remark that any natural number has a successor – a statement which should itself be proved or be taken as an axiom so is not trivial (for more, see Peano's axioms).
In some texts, a trivial proof refers to a statement involving a material implication P→Q, where the consequent Q, is always true.  Here, the proof follows immediately by virtue of the definition of material implication in which as the implication is true regardless of the truth value of the antecedent P if the consequent is fixed as true. 
A related concept is a vacuous truth, where the antecedent P in a material implication P→Q is false.  In this case, the implication is always true regardless of the truth value of the consequent Q – again by virtue of the definition of material implication. 
This article needs additional citations for verification. (January 2023)