Learn

Now that we’ve learned about vector quantities, we can expand upon those lessons and focus on matrices. A matrix is a quantity with m rows and n columns of data. For example, we can combine multiple vectors into a matrix where each column of that matrix is one of the vectors.

To the right, you can see a comparison between scalars, vectors, and matrices for context.

We can also think of vectors as single-column matrices in their own right. Matrices are helpful because they allow us to perform operations on large amounts of data, such as representing entire systems of equations in a single matrix quantity.

Matrices can be represented by using square brackets that enclose the rows and columns of data (elements). The shape of a matrix is said to be mxn, where there are m rows and n columns. When representing matrices as a variable, we denote the matrix with a capital letter and a particular matrix element as the matrix variable with an “m,n” determined by the element’s location. Let’s look at an example of this. Consider the matrix below.

A=[abcdefghi]A= \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}

The value corresponding to the first row and second column is b.

A1,2=bA_{1,2} = b

What is the value corresponding to the second row and third column?

A2,3=?A_{2,3} = ?
Solution
f

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?