How To Subtract Matrices On Excel

A matrix is a rectangular array of numbers. One matrix can be subtracted from another if it is of the same order — that is, if it has the same number of rows and columns. Matrices are often used in statistics. Matrices are usually written surrounded by braces. Excel, the spreadsheet application included with Microsoft Office, refers to a matrix as an "array." It has built-in functionality to make working with matrices, or arrays, simple.

Step 1

Open Excel and enter the first matrix, starting in cell A1. The number of rows and columns you will depends on how your data is organized. For example, suppose the first matrix is: 3 2 1 4 6 8 In this case, you would enter "3" (without the quotation marks) in cell A1, "2" in cell B1, "1" in cell C1, "4" in cell A2, "6" in cell B2 and "8" in cell C2.

Step 2

Enter the second matrix. Skip one column and then enter the matrix in the same manner as the first matrix, but starting from your new column position. If the second matrix is: 1 1 1 2 3 4 You would enter "1" in cells E1, F1 and G1, and enter "2" in E2, "3" in cell F2 and "4" in cell G2.

Step 3

Highlight an area of blank cells of the same shape as the matrices. In this example, highlight cells I1 to K2.

Step 4

In the formula bar, enter =(top-left cell of array 1:bottom-right cell of array 1)-(top-left cell of array 2:bottom-right cell of array 2). Note the user of parentheses and colons. For the example given earlier, you would enter "=(a1:c2)-(e1:g2)" (without quotation marks).

Step 5

Press the Control, Shift and Enter keys simultaneously. (Excel requires that array formulas be entered using Control+Shift+Enter, rather than simply pressing Enter as you usually would.) Excel now enters the result in the highlighted cells.

Cite This Article

MLA

Flom, Peter. "How To Subtract Matrices On Excel" sciencing.com, https://www.sciencing.com/subtract-matrices-excel-8353496/. 4 May 2011.

APA

Flom, Peter. (2011, May 4). How To Subtract Matrices On Excel. sciencing.com. Retrieved from https://www.sciencing.com/subtract-matrices-excel-8353496/

Chicago

Flom, Peter. How To Subtract Matrices On Excel last modified March 24, 2022. https://www.sciencing.com/subtract-matrices-excel-8353496/

Recommended