Calculator for Matrices Up-to 4 Rows
and Up-to 4 Columns, with Application
to Markov Chains Computations

For larger size matrices use:
Matrix Multiplication and Markov Chain Calculator-II

This site is a part of the JavaScript E-labs learning objects for decision making. Other JavaScript in this series are categorized under different areas of applications in the MENU section on this page.


Introduction: Applied business computation lends itself well to calculations that use matrix algebra. Matrix algebra refers to computations that involve vectors (rows or columns of numbers) and matrices (tables of numbers), as wells as scalars (single numbers). In a great many cases, the simplest way to describe a set of relationships uses matrix algebra. Moreover, key calculations that perform routinely are best made with matrix operations. For example, consider the task of portfolio valuation. This requires the multiplication of the number of shares of each security by the corresponding price per share, then the summation of the results. A simple matrix multiplication can accomplish this easily.

"Matrix" is the Latin word for womb, and it retains that sense in English. It can also mean more generally any place in which something is formed or produced.

In using the JavaScript, replace as many zeros as needed with the entries of the matrix staring at the upper left corner of both matrix A, and B. The computational result will be in matrix C.

An [m by n] matrix A is a rectangular array of real numbers with m rows and n columns. (Rows are horizontal and columns are vertical.) The numbers m and n are the dimensions of A. The numbers in the matrix are called its entries. The entry in row i and column j is called aij or Aij.

Addition and Subtraction of Two Matrices: Sum and Difference of Two Matrices: If A and B have the same dimensions, then their sum, A+B, is obtained by adding corresponding entries. In symbols, (A+B)ij = Aij + Bij. If A and B have the same dimensions, then their difference, A - B, is obtained by subtracting corresponding entries. In symbols, (A-B)ij = Aij - Bij.

Scalar Multiple: If A is a matrix and c is a number (sometimes called a scalar in this context), then the scalar multiple, cA, is obtained by multiplying every entry in A by c. In symbols, (cA)ij = c(Aij).

Transpose of a Matrix: The transpose, AT, of a matrix A is the matrix obtained from A by writing its rows as columns. If A is an [m by n] matrix and B = AT, then B is the [n by m] matrix with bij = aji.

Dividing Two Matrices: There is no such a thing as dividing two matrices.

Multiplication of Two Matrices: If A has dimensions [m by n] and B has dimensions [n by p], then the product AB is defined, and has dimensions [m by p]. The entry (AB)ij is obtained by multiplying row i of A by column j of B, which is done by multiplying corresponding entries together and then adding the results.

The following is a numerical example for multiplication of two matrices A, and B, respectively:

To aid in the multiplication, write the second matrix above and to the right of the first and the resulting matrix at the intersection of the two:

Now, to find the first element of the resulting matrix, C11, take the leftmost number in the corresponding row of the first matrix, 4, multiply it with the topmost number in the corresponding column of the second matrix, 1, and then add the product of the next number to the right in the first matrix and the next number down in the second matrix. For the top left element, it would be the following.

(4)(1) + (3)(3) = 13

For the top-right element of the resulting matrix, we will still use row 1 of the first matrix but now use column 2 of the second matrix. This element is solved below.

(4)(2) + (3)(1) = 11

Doing the same with the rest of the numbers leaves the following matrix.

Power of a Matrix: For raising a square matrix A to power of say n = 3, enter the matrix starting at the upper left corner. Then copy it into matrix B by clicking on A ® B, then click on Calculate button, the result is C = A2. Now copy C into B by clicking on C ® B, then click on Calculate button. The result is C = A3.

For larger Value of n there are other possibilities by using your imagination in applying the Copy " ? ® ?" buttons.

Matrix Inversion: The inverse of a square matrix A is a matrix, often denoted by A-1 such that A×A-1 = I, where I is the identity matrix of the same size.
A matrix possessing an inverse is called nonsingular, or invertible.

To invert a matrix, you may like to use the Matrix Inversion JavaScript.



Multiplication

Matrix B :



Matrix A :



Matrix C :



      







For Technical Details, Back to:
Decision Making in Economics and Finance


Kindly email your comments to:
Professor Hossein Arsham


MENU

Decision Tools in Economics & Finance
Europe Mirror Site


Probabilistic Modeling
Europe Mirror Site

 
Statistics
Europe Mirror Site


The Copyright Statement: The fair use, according to the 1996 Fair Use Guidelines for Educational Multimedia, of materials presented on this Web site is permitted for non-commercial and classroom purposes only.
This site may be translated and/or mirrored intact (including these notices), on any server with public access. All files are available at http://www.mirrorservice.org/sites/home.ubalt.edu/ntsbarsh/Business-stat for mirroring.

Kindly e-mail me your comments, suggestions, and concerns. Thank you.

Professor Hossein Arsham   


Back to:

Dr Arsham's Home Page


EOF: Ó 1994-2015.