Matrix operations

Matrix operations manipulate and combine multiple matrices to create new ones. These operations are essential in various fields, including physics, engineering, computer science, and data analysis. The following are the matrix operations:

  1. Addition of matrices

  2. Subtraction of matrices

  3. Scalar multiplication

  4. Transpose of a matrix

Addition of matrices

It combines two matrices of the same dimensions. The addition is performed element-wise, where each element in the resulting matrix is the sum of the corresponding elements from the two matrices.

Suppose we have two matrices AA and BB with dimensions m×nm \times n. Then, the sum of AA and BB, denoted as A+B=C A + B = C , will be:

The resulting matrix CC will have the same dimensions (m×nm \times n) as matrices AA and BB.

Properties

  • Commutative law: For matrices AA and BB with the same dimensions: A+B=B+AA+B=B+A

  • Associative law: For matrices AA, B,B, and CC with same dimensions: A+(B+C)=(A+B)+CA+(B+C)=(A + B) + C

  • Identity property: For any matrix AA, when added to the zero matrix OO, the original matrix remains unchanged: A+O=AA + O= A

  • Additive property: For a matrix AA and its additive inverse A-A: A+(A)=OA + (-A) = O

Subtraction of matrices

It subtracts corresponding elements to form a new matrix. The subtraction is performed element-wise, and the resulting matrix has the same dimensions as the original matrices.

Suppose we have two matrices AA and BB with dimensions m×nm \times n. Then, the subtraction of AA and BB, denoted as AB=C A - B = C , will be:

The resulting matrix CC will have the same dimensions m×nm \times n as matrices AA and BB.

Properties

  • Commutative law: For matrices AA and BB with the same dimensions: ABBAA-B \neq B-A

  • Associative law: For matrices AA, B,B, and CC with same dimensions: A(BC)(AB)CA-(B-C) \neq (A - B) - C

  • Identity property: For any matrix AA and null matrix OO: AA=OA - A= O

  • Additive property: For matrices AA and BB of the same dimensions: AB=A+(B)A-B=A + (-B), where B-B is the negative of matrix BB

Scalar multiplication

It multiplies each element of a matrix by a scalar (a constant). Let AA be a matrix and kk be a scalar, then the scalar multiplication B=kAB = k A by multiplying each element of AA by kk to get the corresponding element in BB.

Each element in matrix BB is obtained by multiplying the scalar kk with corresponding element in matrix AA.

Properties

  • Commutative law: For any matrix AAand a scalar kk: kA=AkkA=Ak

  • Distributive law: For matrices AA and BB with the same dimensions: k(A+B)=kA+kBk (A + B) = k A + k B

  • Identity property: For any matrix AA and the scalark=1k = 1, kA=AkA = A

Note: Learn about matrix multiplication.

Transpose of a matrix

It swaps the rows and columns of a matrix. If AA is an m×nm \times n matrix, then the transpose of AA, denoted as ATA^T, is a n×mn \times m matrix where the ithi^{th} row of AA becomes the ithi^{th} column of ATA^T.

Mathematically, if matrix AA has dimensions m×nm \times n, its transpose ATA^T will have dimensions n×mn \times m:

Properties

  • Transpose of transpose: For matrix AA: (AT)T=A(A^{T})^{T}=A

  • Addition property: For matrices AA and BB with the same dimensions: (A+B)T=AT+BT(A+B)^T=A^T+B^T

  • Scalar multiplication: For any matrix AA and a scalar kk: (kA)T=kAT(kA)^T=kA^T

  • Multiplication property: For matrices AAand BB: (AB)T=BTAT(AB)^T=B^TA^T

Learn about implementation of operations.

Free Resources

Copyright ©2024 Educative, Inc. All rights reserved