Kant distinguishes the difference between a prior knowledge and empirical knowledge. He states that a priori knowledge is not gained from experience. A priori means prior to so there has been no action taken place. A priori is knowledge absolutely independent of all experience. In an a priori frame of mind our approach in the world comes before experiencing and makes it possible to not even be aware of it. Empirical knowledge however is knowledge that is gained from experience. Kant would agree that anything gained from experience is not necessary.
.
The criterion by which determines a priori knowledge is twofold. First, a thought necessary is an a priori judgment not limited to just experience. If a proposition is not derived from any proposition except one which has necessary judgment it is for sure a priori judgment. Second, experience does not offer on its judgments true or strict but only comparatively universality, through induction. If a judgment is thought with strict universality and with no exception possible the judgment is not derived from experience it is legit a priori.
.
The distinctions between analytic and synthetic judgments are similar yet slightly different. Analytic judgment is when the subject and predicate say the same thing. An example would be. "All bodies have extension". A synthetic judgment is when the subject and predicate are not identical but still related. An example would be."This body weighs two pounds".
.
An a priori synthetic judgment is a combination of judgments. An example is."Everything which happens has its cause". The subject is "everything which happens" and the predicate follows. It is a necessary statement. We recognize a change has occurred. We fully expect a cause to happen when something actually happens. It cannot be analytic because it is outside of it.
.
Kant explains matter as unchanging regardless to the material world as being forever changing and through communications of motion actions and reactions must equal.