In mathematics, specifically linear algebra, the Cauchy–Binet formula, named after Augustin-Louis Cauchy and Jacques Philippe Marie Binet, is an identity for the determinant of the product of two rectangular matrices of transpose shapes (so that the product is well-defined and square). It generalizes the statement that the determinant of a product of square matrices is equal to the product of their determinants. The formula is valid for matrices with the entries from any commutative ring. Let A be an m×n matrix and B an n×m matrix. Write [n] for the set {1, ..., n}, and for the set of m-combinations of [n] (i.e., subsets of [n] of size m; there are of them). For , write A[m],S for the m×m matrix whose columns are the columns of A at indices from S, and BS,[m] for the m×m matrix whose rows are the rows of B at indices from S. The Cauchy–Binet formula then states Example: Taking m = 2 and n = 3, and matrices and , the Cauchy–Binet formula gives the determinant Indeed , and its determinant is which equals from the right hand side of the formula. If n < m then is the empty set, and the formula says that det(AB) = 0 (its right hand side is an empty sum); indeed in this case the rank of the m×m matrix AB is at most n, which implies that its determinant is zero. If n = m, the case where A and B are square matrices, (a singleton set), so the sum only involves S = [n], and the formula states that det(AB) = det(A)det(B). For m = 0, A and B are empty matrices (but of different shapes if n > 0), as is their product AB; the summation involves a single term S = Ø, and the formula states 1 = 1, with both sides given by the determinant of the 0×0 matrix. For m = 1, the summation ranges over the collection of the n different singletons taken from [n], and both sides of the formula give , the dot product of the pair of vectors represented by the matrices. The smallest value of m for which the formula states a non-trivial equality is m = 2; it is discussed in the article on the Binet–Cauchy identity. Let be three-dimensional vectors.