In mathematics, a quaternion algebra over a field F is a central simple algebra A over F that has dimension 4 over F. Every quaternion algebra becomes a matrix algebra by extending scalars (equivalently, tensoring with a field extension), i.e. for a suitable field extension K of F, A ⊗ F K {\displaystyle A\otimes _{F}K} is isomorphic to the 2 × 2 matrix algebra over K.
The notion of a quaternion algebra can be seen as a generalization of Hamilton's quaternions to an arbitrary base field. The Hamilton quaternions are a quaternion algebra (in the above sense) over F = R {\displaystyle F=\mathbb {R} } , and indeed the only one over R {\displaystyle \mathbb {R} } apart from the 2 × 2 real matrix algebra, up to isomorphism. When F = C {\displaystyle F=\mathbb {C} } , then the biquaternions form the quaternion algebra over F.