# Matrix multiplication

In mathematicsmatrix multiplication or matrix product is a binary operation that produces a matrix from two matrices with entries in a field, or, more generally, in a ring or even a semiring. The matrix product is designed for representing the composition of linear maps that are represented by matrices. Matrix multiplication is thus a basic tool of linear algebra, and as such has numerous applications in many areas of mathematics, as well as in applied mathematicsstatisticsphysicseconomics, and engineering.[1][2] In more detail, if A is an n × m matrix and B is an m × p matrix, their matrix product AB is an n × p matrix, in which the m entries across a row of A are multiplied with the m entries down a column of Band summed to produce an entry of AB. When two linear maps are represented by matrices, then the matrix product represents the composition of the two maps.

The definition of matrix product requires that the entries belong to a semiring, and does not require multiplication of elements of the semiring to be commutative. In many applications, the matrix elements belong to a field, although the tropical semiring is also a common choice for graph shortest path problems.[3] Even in the case of matrices over fields, the product is not commutative in general, although it is associative and is distributive over matrix addition. The identity matrices (which are the square matrices whose entries are zero outside of the main diagonal and 1 on the main diagonal) are identity elements of the matrix product. It follows that the n × n matrices over a ring form a ring, which is noncommutative except if n = 1 and the ground ring is commutative.

A square matrix may have a multiplicative inverse, called an inverse matrix. In the common case where the entries belong to a commutative ring r, a matrix has an inverse if and only if its determinant has a multiplicative inverse in r. The determinant of a product of square matrices is the product of the determinants of the factors. The n × n matrices that have an inverse form a group under matrix multiplication, the subgroups of which are called matrix groups. Many classical groups (including all finite groups) are isomorphic to matrix groups; this is the starting point of the theory of group representations.

Computing matrix products is a central operation in all computational applications of linear algebra. Its computational complexity is ${displaystyle O(n^{3})}$ (for n × n matrices) for the basic algorithm (this complexity is ${displaystyle O(n^{2.373})}$ for the asymptotically fastest known algorithm[4]). This nonlinear complexity means that matrix product is often the critical part of many algorithms. This is enforced by the fact that many operations on matrices, such as matrix inversion, determinant, solving systems of linear equations, have the same complexity. Therefore various algorithms have been devised for computing products of large matrices, taking into account the architecture of computers (see BLAS, for example).

## Notation

This article will use the following notational conventions: matrices are represented by capital letters in bold, e.g. Avectors in lowercase bold, e.g. a, and entries of vectors and matrices are italic (since they are numbers from a field), e.g. A and aIndex notation is often the clearest way to express definitions, and is used as standard in the literature. The i, jentry of matrix A is indicated by (A)ijAij or aij, whereas a numerical label (not matrix entries) on a collection of matrices is subscripted only, e.g. A1A2, etc.

## Definition

If A is an n × m matrix and B is an m × p matrix,

${displaystyle mathbf {A} ={egin{pmatrix}a_{11}&a_{12}&cdots &a_{1m}\a_{21}&a_{22}&cdots &a_{2m}\vdots &vdots &ddots &vdots \a_{n1}&a_{n2}&cdots &a_{nm}\end{pmatrix}},quad mathbf {B} ={egin{pmatrix}b_{11}&b_{12}&cdots &b_{1p}\b_{21}&b_{22}&cdots &b_{2p}\vdots &vdots &ddots &vdots \b_{m1}&b_{m2}&cdots &b_{mp}\end{pmatrix}}}$

the matrix product C = AB (denoted without multiplication signs or dots) is defined to be the n × p matrix[5][6][7][8]

${displaystyle mathbf {C} ={egin{pmatrix}c_{11}&c_{12}&cdots &c_{1p}\c_{21}&c_{22}&cdots &c_{2p}\vdots &vdots &ddots &vdots \c_{n1}&c_{n2}&cdots &c_{np}\end{pmatrix}}}$

such that

${displaystyle c_{ij}=a_{i1}b_{1j}+cdots +a_{im}b_{mj}=sum _{k=1}^{m}a_{ik}b_{kj},}$

for i = 1, ..., n and j = 1, ..., p.

That is, the entry ${displaystyle c_{ij}}$ of the product is obtained by multiplying term-by-term the entries of the ith row of A and the jth column of B, and summing these m products. In other words, ${displaystyle c_{ij}}$is the dot product of the ith row of A and the jth column of B.

Thus the product AB is defined if and only if the number of columns in A equals the number of rows in B, in this case m.

Usually the entries are numbers, but they may be any kind mathematical objects for which an addition and a multiplication are defined, that are associative, and such that the addition is commutative, and the multiplication is distributive with respect to the addition. In particular, the entries may be matrices themselves (see block matrix).

### Illustration

The figure to the right illustrates diagrammatically the product of two matrices A and B, showing how each intersection in the product matrix corresponds to a row of A and a column of B.

${displaystyle {overset {4 imes 2{ ext{ matrix}}}{egin{bmatrix}{a_{11}}&{a_{12}}\cdot &cdot \{a_{31}}&{a_{32}}\cdot &cdot \end{bmatrix}}}{overset {2 imes 3{ ext{ matrix}}}{egin{bmatrix}cdot &{b_{12}}&{b_{13}}\cdot &{b_{22}}&{b_{23}}\end{bmatrix}}}={overset {4 imes 3{ ext{ matrix}}}{egin{bmatrix}cdot &x_{12}&x_{13}\cdot &cdot &cdot \cdot &x_{32}&x_{33}\cdot &cdot &cdot \end{bmatrix}}}}$

The values at the intersections marked with circles are:

{displaystyle {egin{aligned}x_{12}&={a_{11}}{b_{12}}+{a_{12}}{b_{22}}\x_{33}&={a_{31}}{b_{13}}+{a_{32}}{b_{23}}end{aligned}}}

## Fundamental applications

Historically, matrix multiplication has been introduced for making easier and clarifying computations in linear algebra. This strong relationship between matrix multiplication and linear algebra remains fundamental in all mathematics, as well as in physicsengineering and computer science.

### Linear maps

If a vector space has a finite basis, its elements (vectors) are uniquely represented by a finite sequence, called coordinate vector, or scalars, which are the coordinates of the vector on the basis. These coordinates are commonly organized as a column matrix (also called column vector), that is a matrix with only one column.

linear map A from a vector space of dimension n into a vector space of dimension m maps a column vector

${displaystyle mathbf {x} ={egin{pmatrix}x_{1}\x_{2}\vdots \x_{n}end{pmatrix}}}$

onto the column vector

${displaystyle mathbf {y} =A(mathbf {x} )={egin{pmatrix}a_{11}x_{1}+cdots +a_{1n}x_{n}\a_{21}x_{1}+cdots +a_{2n}x_{n}\vdots \a_{m1}x_{1}+cdots +a_{mn}x_{n}end{pmatrix}}.}$

The linear map A is thus defined by the matrix

${displaystyle mathbf {A} ={egin{pmatrix}a_{11}&a_{12}&cdots &a_{1n}\a_{21}&a_{22}&cdots &a_{2n}\vdots &vdots &ddots &vdots \a_{m1}&a_{m2}&cdots &a_{mn}\end{pmatrix}},}$

and maps the column vector ${displaystyle mathbf {x} }$ to the matrix product

${displaystyle mathbf {y} =mathbf {Ax} .}$

If B is another linear map from the preceding vector space of dimension m, into a vector space of dimension p, it is represented by a ${displaystyle p imes m}$ matrix ${displaystyle mathbf {B} .}$ A straightforward computation shows that the matrix of the composite map ${displaystyle Bcirc A}$ is the matrix product ${displaystyle mathbf {BA} .}$ The general formula of the function composition (that is, ${displaystyle (Bcirc A)(mathbf {x} )=B(A(mathbf {x} ))}$) is instanced here as a specific case of associativity of matrix product (see below):

${displaystyle (mathbf {BA} )mathbf {x} =mathbf {B} (mathbf {Ax} )=mathbf {BAx} .}$

### System of linear equations

The general form of a system of linear equations is

${displaystyle {egin{matrix}a_{11}x_{1}+cdots +a_{1n}x_{n}=b_{1}\a_{21}x_{1}+cdots +a_{2n}x_{n}=b_{2}\vdots \a_{m1}x_{1}+cdots +a_{mn}x_{n}=b_{m}end{matrix}}.}$

Using same notation as above, such a system is equivalent with the single matrix equation

${displaystyle mathbf {Ax} =mathbf {b} .}$

### Dot product, bilinear form and inner product

The dot product of two column vectors is the matrix product

${displaystyle mathbf {x} ^{mathsf {T}}mathbf {y} ,}$

where ${displaystyle mathbf {x} ^{mathsf {T}}}$ is the row vector obtained by transposing ${displaystyle mathbf {x} }$ and the resulting 1×1 matrix is identified with its unique entry.

More generally, any bilinear form over a vector space of finite dimension may be expressed as a matrix product

${displaystyle mathbf {x} ^{mathsf {T}}mathbf {Ay} ,}$

and any inner product may be expressed as

${displaystyle mathbf {x} ^{dagger }mathbf {Ay} ,}$

where ${displaystyle mathbf {x} ^{dagger }}$ denotes the conjugate transpose of ${displaystyle mathbf {x} }$ (conjugate of the transpose, or equivalently transpose of the conjugate).

## General properties

Matrix multiplication shares some properties with usual multiplication. However, matrix multiplication is not defined if the number of columns of the first factor differs from the number of rows of the second factor, and it is non-commutative, even when the product remains definite after changing the order of the factors.[9][10]

### Non-commutativity

An operation is commutative if, given two elements A and B such that the product ${displaystyle mathbf {A} mathbf {B} }$ is defined, then ${displaystyle mathbf {B} mathbf {A} }$ is also defined, and ${displaystyle mathbf {A} mathbf {B} =mathbf {B} mathbf {A} .}$

If A and B are matrices of respective sizes ${displaystyle m imes n}$ and ${displaystyle p imes q}$, then ${displaystyle mathbf {A} mathbf {B} }$ is defined if ${displaystyle n=p}$, and ${displaystyle mathbf {B} mathbf {A} }$ is defined if ${displaystyle m=q}$. Therefore, if one of the products is defined, the other is not defined in general. If ${displaystyle m=q eq n=p}$, the two products are defined, but have different sizes; thus they cannot be equal.

It follows that the equality of the two products makes sense only if ${displaystyle m=q=n=p}$, that is if A and B are square matrices of the same size. Even in this case, one has in general

${displaystyle mathbf {A} mathbf {B} eq mathbf {B} mathbf {A} .}$

For example

${displaystyle {egin{pmatrix}0&1\0&0end{pmatrix}}{egin{pmatrix}0&0\1&0end{pmatrix}}={egin{pmatrix}1&0\0&0end{pmatrix}},}$

and

${displaystyle {egin{pmatrix}0&0\1&0end{pmatrix}}{egin{pmatrix}0&1\0&0end{pmatrix}}={egin{pmatrix}0&0\0&1end{pmatrix}}.}$

This example may be expanded for showing that, if A is a ${displaystyle n imes n}$ matrix with entries in a field F, then ${displaystyle mathbf {A} mathbf {B} =mathbf {B} mathbf {A} }$ for every ${displaystyle n imes n}$ matrix B with entries in Fif and only if ${displaystyle mathbf {A} =c,mathbf {I} }$where ${displaystyle cin F}$, and I is the ${displaystyle n imes n}$ identity matrix. If, instead of a field, the entries are supposed to belong to a ring, then one must add the condition that c belongs to the center of the ring.

### Distributivity

The matrix product is distributive with respect of matrix addition. That is, if ABCD are matrices of respective sizes m × nn × pn × p, and p × q, one has (left distributivity)

${displaystyle mathbf {A} (mathbf {B} +mathbf {C} )=mathbf {AB} +mathbf {AC} ,}$

and (right distributivity)

${displaystyle (mathbf {B} +mathbf {C} )mathbf {D} =mathbf {BD} +mathbf {CD} .}$

This results from the distributivity for coefficients by

${displaystyle sum _{k}a_{ik}(b_{kj}+c_{kj})=sum _{k}a_{ik}b_{kj}+sum _{k}a_{ik}c_{kj}}$
${displaystyle sum _{k}(b_{ik}+c_{ik})d_{kj}=sum _{k}b_{ik}d_{kj}+sum _{k}c_{ik}d_{kj}.}$

### Product with a scalar

If A is a matrix and c a scalar, then the matrices ${displaystyle cmathbf {A} }$ and ${displaystyle mathbf {A} c}$ are obtained by left or right multiplying all entries of A by c. If the scalars have the commutative property, then ${displaystyle cmathbf {A} =mathbf {A} c.}$

If the product ${displaystyle mathbf {AB} }$ is defined (that is the number of columns of A equals the number of rows of B, then

${displaystyle c(mathbf {AB} )=(cmathbf {A} )mathbf {B} }$ and ${displaystyle (mathbf {A} mathbf {B} )c=mathbf {A} (mathbf {B} c).}$

If the scalars have the commutative property, then all four matrices are equal. More generally, all four are equal if c belongs to the center of a ring containing the entries of the matrices, because in this case cX = Xc for all matrices X.

These properties result from the bilinearity of the product of scalars:

${displaystyle cleft(sum _{k}a_{ik}b_{kj} ight)=sum _{k}(ca_{ik})b_{kj}}$
${displaystyle left(sum _{k}a_{ik}b_{kj} ight)c=sum _{k}a_{ik}(b_{kj}c).}$

### Transpose

If the scalars have the commutative property, the transpose of a product of matrices is the product, in the reverse order, of the transposes of the factors. That is

${displaystyle (mathbf {AB} )^{mathsf {T}}=mathbf {B} ^{mathsf {T}}mathbf {A} ^{mathsf {T}}}$

where T denotes the transpose, that is the interchange of rows and columns.

This identity does not hold for noncommutative entries, since the order between the entries of A and B is reversed, when one expands the definition of the matrix product.

### Complex conjugate

If A and B have complex entries, then

${displaystyle (mathbf {AB} )^{*}=mathbf {A} ^{*}mathbf {B} ^{*}}$

where * denotes the entry-wise complex conjugate of a matrix.

This results of applying to the definition of matrix product the fact that the conjugate of a sum is the sum of the conjugates of the summands and the conjugate of a product is the product of the conjugates of the factors.

Transposition acts on the indices of the entries, while conjugation acts independently on the entries themselves. It results that, if A and B have complex entries, one has

${displaystyle (mathbf {AB} )^{dagger }=mathbf {B} ^{dagger }mathbf {A} ^{dagger },}$

where  denotes the conjugate transpose (conjugate of the transpose, or equivalently transpose of the conjugate).

### Associativity

Given three matrices AB and C, the products (AB)C and A(BC) are defined if and only if the number of columns of A equals the number of rows of B and the number of columns of B equals the number of rows of C (in particular, if one of the products is defined, the other is also defined). In this case, one has the associative property

${displaystyle (mathbf {AB} )mathbf {C} =mathbf {A} (mathbf {BC} ).}$

As for any associative operation, this allows omitting parentheses, and writing the above products as ${displaystyle mathbf {ABC} .}$

This extends naturally to the product of any number of matrices provided that the dimensions match. That is, if A1A2, ..., An are matrices such that the number of columns of Aiequals the number of rows of Ai + 1 for i = 1, ..., n – 1, then the product

${displaystyle prod _{i=1}^{n}mathbf {A} _{i}=mathbf {A} _{1}mathbf {A} _{2}cdots mathbf {A} _{n}}$

is defined and does not depend on the order of the multiplications, if the order of the matrices is kept fixed.

These properties may be proved by straightforward but complicated summation manipulations. This result also follows from the fact that matrices represent linear maps. Therefore, the associative property of matrices is simply a specific case of the associative property of function composition.

#### Complexity is not associative

Although the result of a sequence of matrix products does not depend on the order of operation (provided that the order of the matrices is not changed), the computational complexitymay depend dramatically on this order.

For example, if AB and C are matrices of respective sizes 10×30, 30×5, 5×60, computing (AB)C needs 10×30×5 + 10×5×60 = 4,500 multiplications, while computing A(BC)needs 30×5×60 + 10×30×60 = 27,000 multiplications.

Algorithms have been designed for choosing the best order of products, see Matrix chain multiplication. When the number n of matrices increases, it has been shown that the choice of the best order has a complexity of ${displaystyle O(nlog n).}$

#### Application to similarity

Any invertible matrix ${displaystyle mathbf {P} }$ defines a similarity transformation (on square matrices of the same size as ${displaystyle mathbf {P} }$)

${displaystyle S_{mathbf {P} }(mathbf {A} )=mathbf {P} ^{-1}mathbf {A} mathbf {P} .}$

Similarity transformations map product to products, that is

${displaystyle S_{mathbf {P} }(mathbf {AB} )=S_{mathbf {P} }(mathbf {A} )S_{mathbf {P} }(mathbf {B} ).}$

In fact, one has

${displaystyle mathbf {P} ^{-1}(mathbf {AB} )mathbf {P} =mathbf {P} ^{-1}mathbf {A} (mathbf {P} mathbf {P} ^{-1})mathbf {B} mathbf {P} =(mathbf {P} ^{-1}mathbf {A} mathbf {P} )(mathbf {P} ^{-1}mathbf {B} mathbf {P} ).}$

## Square matrices

Let us denote ${displaystyle {mathcal {M}}_{n}(R)}$ the set of n×n square matrices with entries in a ring R, which, in practice, is often a field.

In ${displaystyle {mathcal {M}}_{n}(R)}$, the product is defined for every pair of matrices. This makes ${displaystyle {mathcal {M}}_{n}(R)}$ a ring, which has the identity matrix I as identity element (the matrix whose diagonal entries are equal to 1 and all other entries are 0). This ring is also an associative R-algebra.

If n > 1, many matrices do not have a multiplicative inverse. For example, a matrix such that all entries of a row (or a column) are 0 does not have an inverse. If it exists, the inverse of a matrix A is denoted A−1, and, thus verifies

${displaystyle mathbf {A} mathbf {A} ^{-1}=mathbf {A} ^{-1}mathbf {A} =mathbf {I} .}$

A matrix that has an inverse is an invertible matrix. Otherwise, it is a singular matrix.

A product of matrices is invertible if and only if each factor is invertible. In this case, one has

${displaystyle (mathbf {A} mathbf {B} )^{-1}=mathbf {B} ^{-1}mathbf {A} ^{-1}.}$

When R is commutative, and, in particular, when it is a field, the determinant of a product is the product of the determinants. As determinants are scalars, and scalars commute, one has thus

${displaystyle det(mathbf {AB} )=det(mathbf {BA} )=det(mathbf {A} )det(mathbf {B} ).}$

The other matrix invariants do not behave as well with products. Nevertheless, if R is commutative, ${displaystyle mathbf {AB} }$ and ${displaystyle mathbf {BA} }$ have the same trace, the same characteristic polynomial, and the same eigenvalues with the same multiplicities. However, the eigenvectors are generally different if ${displaystyle mathbf {AB} eq mathbf {BA} .}$

### Powers of a matrix

One may raise a square matrix to any nonnegative integer power multiplying it by itself repeatedly in the same way as for ordinary numbers. That is,

${displaystyle mathbf {A} ^{0}=mathbf {I} ,}$
${displaystyle mathbf {A} ^{1}=mathbf {A} ,}$
${displaystyle mathbf {A} ^{k}=underbrace {mathbf {A} mathbf {A} cdots mathbf {A} } _{k{ ext{ times}}}.}$

Computing the kth power of a matrix needs k – 1 times the time of a single matrix multiplication, if it is done with the trivial algorithm (repeated multiplication). As this may be very time consuming, one generally prefers using exponentiation by squaring, which requires less than 2 log2 k matrix multiplications, and is therefore much more efficient.

An easy case for exponentiation is that of a diagonal matrix. Since the product of diagonal matrices amounts to simply multiplying corresponding diagonal elements together, the kth power of a diagonal matrix is obtained by raising the entries to the power k:

${displaystyle {egin{pmatrix}a_{11}&0&cdots &0\0&a_{22}&cdots &0\vdots &vdots &ddots &vdots \0&0&cdots &a_{nn}end{pmatrix}}^{k}={egin{pmatrix}a_{11}^{k}&0&cdots &0\0&a_{22}^{k}&cdots &0\vdots &vdots &ddots &vdots \0&0&cdots &a_{nn}^{k}end{pmatrix}}.}$

## Complexity

The bound on ω over time.

The matrix multiplication algorithm that results of the definition requires, in the worst case${displaystyle n^{3}}$ multiplications of scalars and ${displaystyle (n-1)n^{2}}$ additions for computing the product of two square n×n matrices. Its computational complexity is therefore ${displaystyle O(n^{3})}$, in a model of computation for which the scalar operations require a constant time (in practice, this is the case for floating point numbers, but not for integers).

Rather surprisingly, this complexity is not optimal, as shown in 1969 by Volker Strassen, who provided an algorithm, now called Strassen's algorithm, with a complexity of ${displaystyle O(n^{log _{2}7})approx O(n^{2.807}).}$ The exponent appearing in the complexity of matrix multiplication has been improved several times, leading to Coppersmith–Winograd algorithm with a complexity of O(n2.376) (1990).[11] This algorithm has been slightly improved in 2013 by Virginia Vassilevska Williams (exponent 2.3729) and in 2014 by François Le Gall, for a final (up to date) complexity of O(n2.3728639).[4]

The greatest lower bound for the exponent of matrix multiplication algorithm is generally called ${displaystyle omega }$. One has ${displaystyle 2leq omega }$, because one has to read the ${displaystyle n^{2}}$ elements of a matrix for multiplying it by another matrix. Thus ${displaystyle 2leq omega <2.373}$. It is unknown whether ${displaystyle 2. The largest known lower bound for matrix-multiplication complexity is Ω(n2 log(n)), for a restricted kind of arithmetic circuits, and is due Ran Raz.[12]

### Related complexities

The importance of the computational complexity of matrix multiplication relies on the facts that many algorithmic problems may be solved by means of matrix computation, and most problems on matrices have a complexity which is either the same as that of matrix multiplication (up to a multiplicative constant), or may be expressed in term of the complexity of matrix multiplication or its exponent ${displaystyle omega .}$

There are several advantages of expressing complexities in terms of the exponent ${displaystyle omega }$ of matrix multiplication. Firstly, if ${displaystyle omega }$ is improved, this will automatically improve the known upper bound of complexity of many algorithms. Secondly, in practical implementations, one never uses the matrix multiplication algorithm that has the best asymptotical complexity, because the constant hidden behind the big O notation is too large for making the algorithm competitive for sizes of matrices that can be manipulated in a computer. Thus expressing complexities in terms of ${displaystyle omega }$ provide a more realistic complexity, since it remains valid whichever algorithm is chosen for matrix computation.

Problems that have the same asymptotic complexity as matrix multiplication include determinantmatrix inversionGaussian elimination (see next section). Problems with complexity that is expressible in terms of ${displaystyle omega }$ include characteristic polynomialeigenvalues (but not eigenvectors), Hermite normal form, and Smith normal form.[citation needed]

### Matrix inversion, determinant and Gaussian elimination

In his 1969 paper, where he proved the complexity ${displaystyle O(n^{2.807})}$ for matrix computation, Strassen proved also the Matrix inversiondeterminant and Gaussian elimination have, up to a multiplicative constant, the same computational complexity as matrix multiplication. The proof does not make any assumptions on matrix multiplication that is used, except that its complexity is ${displaystyle O(n^{omega })}$ for some ${displaystyle omega geq 2}$

The starting point of Strassen's proof is using block matrix multiplication. Specifically, a matrix of even dimension 2n×2n may be partitioned in four n×n blocks

${displaystyle {egin{bmatrix}{A}&{B}\{C}&{D}end{bmatrix}}.}$

Under this form, its inverse is

${displaystyle {egin{bmatrix}{A}&{B}\{C}&{D}end{bmatrix}}^{-1}={egin{bmatrix}{A}^{-1}+{A}^{-1}{B}({D}-{CA}^{-1}{B})^{-1}{CA}^{-1}&-{A}^{-1}{B}({D}-{CA}^{-1}{B})^{-1}\-({D}-{CA}^{-1}{B})^{-1}{CA}^{-1}&({D}-{CA}^{-1}{B})^{-1}end{bmatrix}},}$

provided that A and ${displaystyle {D}-{CA}^{-1}{B}}$ are invertible.

Thus, the inverse of a 2n×2n matrix may be computed with two inversions, six multiplications and four additions or additive inverses of n×n matrices. It follows that, denoting respectively by I(n)M(n) and A(n) = n2 the number of operations needed for multiplying, inverting and adding n×n matrices, one has

${displaystyle I(2n)leq 2I(n)+6M(n)+4A(n).}$

If ${displaystyle n=2^{k},}$ one may apply this formula recursively:

{displaystyle {egin{aligned}I(2^{k})&leq 2I(2^{k-1})+6M(2^{k-1})+4A(2^{k-1})\&leq 2^{2}I(2^{k-2})+6(M(2^{k-1})+2M(2^{k-2}))+4(A(2^{k-1})+2A(2^{k-2}))\&ldots end{aligned}}}

If ${displaystyle M(n)leq cn^{omega },}$ and ${displaystyle alpha =2^{omega }geq 4,}$ one gets eventually

{displaystyle {egin{aligned}I(2^{k})&leq 2^{k}I(1)+6c(alpha ^{k-1}+2alpha ^{k-2}+cdots +2^{k-1}alpha ^{0})+k2^{k+1}\&leq 2^{k}+6c{frac {alpha ^{k}-2^{k}}{alpha -2}}+k2^{k+1}\&leq d(2^{k})^{omega }.end{aligned}}}

for some constant d.

For matrices whose dimension is not a power of two, the same complexity is reached by increasing the dimension of the matrix to a power of two, by padding the matrix with rows and columns whose entries are 1 on the diagonal and 0 elsewhere.

This proves the asserted complexity for matrices such that all submatrices that have to be inverted are indeed invertible. This complexity is thus proved for almost all matrices, as a matrix with randomly chosen entries is invertible with probability one.

The same argument applies to LU decomposition, as, if the matrix A is invertible, the equality

${displaystyle {egin{bmatrix}{A}&{B}\{C}&{D}end{bmatrix}}={egin{bmatrix}I&0\CA^{-1}&Iend{bmatrix}},{egin{bmatrix}A&B\0&D-CA^{-1}Bend{bmatrix}}}$

defines a block LU decomposition that may be applied recursively to ${displaystyle A}$ and ${displaystyle D-CA^{-1}B,}$ for getting eventually a true LU decomposition of the original matrix.

The argument applies also for the determinant, since it results from the block LU decomposition that

${displaystyle det {egin{bmatrix}{A}&{B}\{C}&{D}end{bmatrix}}=det(A)det(D-CA^{-1}B).}$

## Other matrix multiplications

The term "matrix multiplication" is most commonly reserved for the definition given in this article. It could be more loosely applied to other operations on matrices.

## Notes

1. ^ Lerner, R. G.; Trigg, G. L. (1991). Encyclopaedia of Physics (2nd ed.). VHC publishers. ISBN 978-3-527-26954-9.
2. ^ Parker, C. B. (1994). McGraw Hill Encyclopaedia of Physics (2nd ed.). ISBN 978-0-07-051400-3.
3. ^ Motwani, RajeevRaghavan, Prabhakar (1995). Randomized Algorithms. Cambridge University Press. p. 280. ISBN 9780521474658.
4.  Le Gall, François (2014), "Powers of tensors and fast matrix multiplication", Proceedings of the 39th International Symposium on Symbolic and Algebraic Computation (ISSAC 2014)arXiv:1401.7714Bibcode:2014arXiv1401.7714L
5. ^ Lipschutz, S.; Lipson, M. (2009). Linear Algebra. Schaum's Outlines (4th ed.). McGraw Hill (USA). pp. 30–31. ISBN 978-0-07-154352-1.
6. ^ Riley, K. F.; Hobson, M. P.; Bence, S. J. (2010). Mathematical methods for physics and engineering. Cambridge University Press. ISBN 978-0-521-86153-3.
7. ^ Adams, R. A. (1995). Calculus, A Complete Course (3rd ed.). Addison Wesley. p. 627. ISBN 0 201 82823 5.
8. ^ Horn, Johnson (2013). Matrix Analysis (2nd ed.). Cambridge University Press. p. 6. ISBN 978 0 521 54823 6.
9. ^ Lipcshutz, S.; Lipson, M. (2009). "2". Linear Algebra. Schaum's Outlines (4th ed.). McGraw Hill (USA). ISBN 978-0-07-154352-1.
10. ^ Horn, Johnson (2013). "0". Matrix Analysis (2nd ed.). Cambridge University Press. ISBN 978 0 521 54823 6.
11. ^
12. ^ Raz, Ran (January 2003). "On the Complexity of Matrix Product". SIAM Journal on Computing32 (5): 1356–1369. doi:10.1137/s0097539702402147ISSN 0097-5397.

## قسم الرياضيات

### التوقيت والتقويم



_time.start(["thetimenow"]);





### توقيت الصلاة بمدينة حوطة سدير





### محرك بحث جوجل





### إعلانات

1- الاختبار الفصلى الثانى لمقرر التحليل العددى (يوم الاحد الموافق 3 / 7/ 1440 هـ)

2- الاختبار الفصلى الثانى لمقررحساب المتجهات (يوم الثلاثاء الموافق 5 / 7 / 1440 هـ)

الأثنين: 10 - 12

الثلاثاء: 8 - 10

الأربعاء: 8 - 10

### آلة حاسبة





### إحصائية الموقع

عدد الصفحات: 256

البحوث والمحاضرات: 155

الزيارات: 127366