Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Matrix multiplication
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Definitions== ===Matrix times matrix=== If {{math|'''A'''}} is an {{math|''m'' Γ ''n''}} matrix and {{math|'''B'''}} is an {{math|''n'' Γ ''p''}} matrix, <math display="block">\mathbf{A}=\begin{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},\quad\mathbf{B}=\begin{pmatrix} b_{11} & b_{12} & \cdots & b_{1p} \\ b_{21} & b_{22} & \cdots & b_{2p} \\ \vdots & \vdots & \ddots & \vdots \\ b_{n1} & b_{n2} & \cdots & b_{np} \\ \end{pmatrix}</math> the ''matrix product'' {{math|1='''C''' = '''AB'''}} (denoted without multiplication signs or dots) is defined to be the {{math|''m'' Γ ''p''}} matrix<ref>{{cite book| title=Linear Algebra | edition=4th | first1 = S. | last1 = Lipschutz | first2 = M. | last2 = Lipson|series=Schaum's Outlines | publisher=McGraw Hill (USA) | date=2009 | pages=30β31 | isbn=978-0-07-154352-1}}</ref><ref>{{cite book | title=Mathematical methods for physics and engineering | url=https://archive.org/details/mathematicalmeth00rile | url-access = registration | first1 = K. F. | last1 = Riley | first2 = M. P. | last2 = Hobson | first3 = S. J. | last3 = Bence| publisher=Cambridge University Press | date=2010 | isbn=978-0-521-86153-3}}</ref><ref>{{cite book | title=Calculus, A Complete Course | edition=3rd| first = R. A. | last = Adams|publisher=Addison Wesley |date=1995 |page=627 |isbn=0-201-82823-5}}</ref><ref>{{cite book|title=Matrix Analysis | last = Horn | first = Johnson |edition=2nd | publisher=Cambridge University Press | date=2013 |page=6 |isbn=978-0-521-54823-6}}</ref> <math display="block">\mathbf{C} = \begin{pmatrix} c_{11} & c_{12} & \cdots & c_{1p} \\ c_{21} & c_{22} & \cdots & c_{2p} \\ \vdots & \vdots & \ddots & \vdots \\ c_{m1} & c_{m2} & \cdots & c_{mp} \\ \end{pmatrix}</math> such that <math display="block"> c_{ij} = a_{i1} b_{1j} + a_{i2} b_{2j} + \cdots + a_{in} b_{nj} = \sum_{k=1}^n a_{ik} b_{kj}, </math> for {{math|1=''i'' = 1, ..., ''m''}} and {{math|1=''j'' = 1, ..., ''p''}}. That is, the entry {{tmath|c_{ij} }} of the product is obtained by multiplying term-by-term the entries of the {{mvar|i}}th row of {{math|'''A'''}} and the {{mvar|j}}th column of {{math|'''B'''}}, and summing these {{mvar|n}} products. In other words, {{tmath|c_{ij} }} is the [[dot product]] of the {{mvar|i}}th row of {{math|'''A'''}} and the {{mvar|j}}th column of {{math|'''B'''}}. Therefore, {{math|'''AB'''}} can also be written as <math display="block">\mathbf{C} = \begin{pmatrix} a_{11}b_{11} +\cdots + a_{1n}b_{n1} & a_{11}b_{12} +\cdots + a_{1n}b_{n2} & \cdots & a_{11}b_{1p} +\cdots + a_{1n}b_{np} \\ a_{21}b_{11} +\cdots + a_{2n}b_{n1} & a_{21}b_{12} +\cdots + a_{2n}b_{n2} & \cdots & a_{21}b_{1p} +\cdots + a_{2n}b_{np} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1}b_{11} +\cdots + a_{mn}b_{n1} & a_{m1}b_{12} +\cdots + a_{mn}b_{n2} & \cdots & a_{m1}b_{1p} +\cdots + a_{mn}b_{np} \\ \end{pmatrix} </math> Thus the product {{math|'''AB'''}} is defined if and only if the number of columns in {{math|'''A'''}} equals the number of rows in {{math|'''B'''}},<ref name=":1" /> in this case {{math|''n''}}. In most scenarios, the entries are numbers, but they may be any kind of [[mathematical object]]s for which an addition and a multiplication are defined, that are [[associative property|associative]], and such that the addition is [[commutative property|commutative]], and the multiplication is [[distributive property|distributive]] with respect to the addition. In particular, the entries may be matrices themselves (see [[block matrix]]). ===Matrix times vector=== A vector <math>\mathbf x</math> of length <math>n</math> can be viewed as a [[column vector]], corresponding to an <math>n\times1</math> matrix <math>\mathbf X</math> whose entries are given by <math>\mathbf X_{i1}=\mathbf x_i.</math> If <math>\mathbf A</math> is an <math>m\times n</math> matrix, the matrix-times-vector product denoted by <math>\mathbf {Ax}</math> is then the vector <math>\mathbf y</math> that, viewed as a column vector, is equal to the <math>m\times1</math> matrix <math>\mathbf{AX}.</math> In index notation, this amounts to: :<math>y_i=\sum_{j=1}^n a_{ij}x_j.</math> One way of looking at this is that the changes from "plain" vector to column vector and back are assumed and left implicit. ===Vector times matrix=== Similarly, a vector <math>\mathbf x</math> of length <math>n</math> can be viewed as a [[row vector]], corresponding to a <math>1\times n</math> matrix. To make it clear that a row vector is meant, it is customary in this context to represent it as the [[transpose]] of a column vector; thus, one will see notations such as <math>\mathbf{x}^\mathrm{T}\mathbf{A}.</math> The identity <math>\mathbf{x}^\mathrm{T}\mathbf{A}=(\mathbf{A}^\mathrm{T}\mathbf{x})^\mathrm{T}</math> holds. In index notation, if <math>\mathbf A</math> is an <math>n\times p</math> matrix, <math>\mathbf{x}^\mathrm{T}\mathbf{A}=\mathbf{y}^\mathrm{T}</math> amounts to: <math>y_k=\sum_{j=1}^n x_j a_{jk}.</math> ===Vector times vector=== The [[dot product]] <math>\mathbf a\cdot\mathbf b</math> of two vectors <math>\mathbf a</math> and <math>\mathbf b</math> of equal length is equal to the single entry of the <math>1\times 1</math> matrix resulting from multiplying these vectors as a row and a column vector, thus: <math>\mathbf{a}^\mathrm{T}\mathbf{b}</math> (or <math>\mathbf{b}^\mathrm{T}\mathbf{a},</math> which results in the same <math>1\times 1</math> matrix). ===Illustration=== [[File:Matrix multiplication diagram 2.svg|right|thumb]] The figure to the right illustrates diagrammatically the product of two matrices {{math|'''A'''}} and {{math|'''B'''}}, showing how each intersection in the product matrix corresponds to a row of {{math|'''A'''}} and a column of {{math|'''B'''}}. <math display="block"> \overset{4\times 2 \text{ matrix}}{\begin{bmatrix} a_{11} & a_{12} \\ \cdot & \cdot \\ a_{31} & a_{32} \\ \cdot & \cdot \\ \end{bmatrix}} \overset{2\times 3\text{ matrix}}{\begin{bmatrix} \cdot & b_{12} & b_{13} \\ \cdot & b_{22} & b_{23} \\ \end{bmatrix}} = \overset{4\times 3\text{ matrix}}{\begin{bmatrix} \cdot & c_{12} & \cdot \\ \cdot & \cdot & \cdot \\ \cdot & \cdot & c_{33} \\ \cdot & \cdot & \cdot \\ \end{bmatrix}} </math> The values at the intersections, marked with circles in figure to the right, are: <math display="block">\begin{align} c_{12} & = a_{11} b_{12} + a_{12} b_{22} \\ c_{33} & = a_{31} b_{13} + a_{32} b_{23} . \end{align}</math>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Matrix multiplication
(section)
Add topic