This book is divided into two parts. The first part is preliminary and consists of algebraic number theory and the theory of semisimple algebras. There are two principal topics: classification of quadratic forms and quadratic Diophantine equations. The second topic is a new framework which contains the investigation of Gauss on the sums of three squares as a special case. To make the book concise, the author proves some basic theorems in number theory only in some special cases. However, the book is self-contained when the base field is the rational number field, and the main theorems are stated with an arbitrary number field as the base field. So the reader familiar with class field theory will be able to learn the arithmetic theory of quadratic forms with no further references.