Subject matter is the cause, the object, the thing in dispute.
The authority of a court to decide a particular type of case is called subject- matter jurisdictionand is is set by the federal or state Constitution, or by state statutes.
In order for a court to have subject-matter jurisdiction over a divorce action, at least one spouse must have lived in the county where the court is located for a certain period of time. Some states also require the spouse to have lived within the state for a certain length of time, usually a few months longer than the time in the county. For example, to obtain a divorce in California, a person must have lived in California for at least six months, and in the particular county in which he wants to obtain the divorce for at least three months. In Illinois, a person must have lived in the state for ninety days, in New York and New Jersey, the requirement is one year. In Texas, a person must have lived in the state for six months and in the particular county in which she wants to obtain the divorce for at least ninety days.
It is a fatal objection to the jurisdiction of the court when it has not cognizance of the subject-matter of the action; as, if a cause exclusively of admiralty jurisdiction were brought in a court of common law, or a criminal proceeding in a court having jurisdiction of civil cases only. In such case, neither a plea to the jurisdiction, nor any other plea would be required to oust the court of jurisdiction. The cause might be dismissed upon motion, by the court, ex officio.