WordGPT

Math ยท Linear algebra

Compute products of two matrices and compare

Multiply the matrices A=[1234]A = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} and B=[0110]B = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} in both orders (ABAB and BABA), and explain why ABโ‰ BAAB \neq BA.

A
[[1, 2], [3, 4]]
B
[[0, 1], [1, 0]]
  • Number recomputed
    Recomputed from the given data. (AB)_11: 1*0 + 2*1 = 2 matches. (AB)_12: 1*1 + 2*0 = 1 matches. (AB)_21: 3*0 + 4*1 = 4 matches. (AB)_22: 3*1 + 4*0 = 3 matches. (BA)_11: 0*1 + 1*3 = 3 matches. (BA)_12: 0*2 + 1*4 = 4 matches. (BA)_21: 1*1 + 0*3 = 1 matches. (BA)_22: 1*2 + 0*4 = 2 matches.
  • Steps not machine-checked
    The computer algebra check could not read the formulas of this solution (words, units, or equations to solve are not checked).
  • A second model agrees
    A second model solved it without seeing the first answer and got the same numbers: The dimensionless products are AB = [[2, 1], [4, 3]] and BA = [[3, 4], [1, 2]], so AB โ‰  BA because their corresponding entries differ.

Solution

  1. By the definition of matrix multiplication, each entry (AB)ij(AB)_{ij} of the product ABAB is the dot product of row ii of AA with column jj of BB. Multiplying AA on the right by the permutation matrix BB swaps the columns of AA.

    AB=[1234][0110]=[1(0)+2(1)1(1)+2(0)3(0)+4(1)3(1)+4(0)]=[2143]AB = \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} = \begin{bmatrix} 1(0)+2(1) & 1(1)+2(0) \\ 3(0)+4(1) & 3(1)+4(0) \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix}
    (1)
  2. Using the same row-by-column rule for the reverse order BABA, each entry (BA)ij(BA)_{ij} is the dot product of row ii of BB with column jj of AA. Multiplying AA on the left by the permutation matrix BB swaps the rows of AA.

    BA=[0110][1234]=[0(1)+1(3)0(2)+1(4)1(1)+0(3)1(2)+0(4)]=[3412]BA = \begin{bmatrix} 0 & 1 \\ 1 & 0 \end{bmatrix} \begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} = \begin{bmatrix} 0(1)+1(3) & 0(2)+1(4) \\ 1(1)+0(3) & 1(2)+0(4) \end{bmatrix} = \begin{bmatrix} 3 & 4 \\ 1 & 2 \end{bmatrix}
    (2)
  3. Comparing the corresponding entries of the two products shows that ABโ‰ BAAB \neq BA because matrix multiplication is not commutative in general: in ABAB the rows of AA pair with the columns of BB (swapping the columns of AA), whereas in BABA the rows of BB pair with the columns of AA (swapping the rows of AA).

    [2143]โ‰ [3412]\begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix} \neq \begin{bmatrix} 3 & 4 \\ 1 & 2 \end{bmatrix}
    (3)

Answer

AB=[2143],BA=[3412],ABโ‰ BAAB = \begin{bmatrix} 2 & 1 \\ 4 & 3 \end{bmatrix}, \quad BA = \begin{bmatrix} 3 & 4 \\ 1 & 2 \end{bmatrix}, \quad AB \neq BA

The products are AB = [[2, 1], [4, 3]] and BA = [[3, 4], [1, 2]], which are unequal because matrix multiplication is non-commutative (right-multiplying by B swaps the columns of A, while left-multiplying by B swaps the rows of A).

Ask a follow-up

Stuck on a step, or want another one like it? Ask, and the tutor continues from this solution.

Lesson: Matrices and their operationsLesson: Vectors

Free to try: you land in the chat with this problem already in it.

Make images to share

Images made for the phone screen: change anything and watch it

PDF of these images
Layout and shapeCarousel ยท Portrait 4:5

Layout

Shape

TextSerif ยท 100% ยท left

Font

Text size

100%

Alignment

ColoursWhite ยท ink automatic

Background

Ink

Header, footer and handlewordgptpro.com ยท bottom left

Header

top of every image

Footer

bottom of every image

Handle

wordgptpro.com on free plans

Free plans carry wordgptpro.com on every image. With a paid plan you can show your own handle (your @name or brand) or none.

Download as:PDFWordWeb pageMarkdownLaTeXText

More in Linear algebra

Solved with wordgptpro.com. Written by an AI and checked by a computation; read it before you rely on it.