It is well-known that the exceptional Lie algebras f4 and g2 arise from the octonions as the derivation algebras of the 3 × 3 hermitian and 1 × 1 antihermitian matrices, respectively. Inspired by this, we compute the derivation algebras of the spaces of hermitian and antihermitian matrices over an octonion algebra in all dimensions.