What Is An Array In Science?

In the math and sciences, an array is a set or an arrangement of items. Arrays are usually sets of numbers or objects, and they are typically organized in columns, rows, or a matrix. Arrays are frequently used to illustrate the principles of division and medication.

An array is simply a data structure, any data structure. Arrays contain points of data, and these points of data can be arranged into rows or columns.

Examples of array organization and manipulation can be seen around us in everyday life. For instance, consider how candies or chocolates can be arrayed in a box of chocolates, or think about eggs organized in an egg carton, or think about board games like chess and the chessboard that organizes pieces. In the example of the box of chocolates, a box of chocolates might contain 12 rows and eight columns, that is to say, chocolates arranged in a fashion that is 12 across and eight down.

To save time figuring out how many chocolates there are, instead of counting every one of them, you just have to multiply 8 x 12, to figure that there are 96 chocolates in the box. The array in this example can be any column, row, the entire box, or any subset of the chocolates. Arrays are simply sets of items. You could also have an array that is simply 1 x 2 or 1 x 3. The array could be 3 x1 or 3 x 3, or 4 x 3. When an array is divided into rows and columns, every row or every column must have the same number of items as the other column or row.

However, the key thing to understand is that doing math with arrays can be much easier and simpler than manipulating each item individually, allowing for the quick multiplication or division of large quantities of items.

Describing Multiplication With Arrays

A 2 x 4 array of white chocolate. Photo: By Slffea, Mysid – Drawn by Slffea, vectorized by Mysid., CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=1367858

When describing arrays being multiplied together, it is common practice to reference the arrays by the factors which are being multiplied together. For instance, a 4 x 4 array would describe an array that has 16 items in it, with four rows and four columns. This type of array multiplication is usually taught to elementary school students, and the computation is made more understandable by breaking the multiplication operations down into simpler steps, adding large sums together multiple times.

For instance, if one had an 8 x 8 array, then there are 64 items in the array in total and the number of items can be understood quickly not by adding the rows or columns of a together and counting the individual items, but by multiplying eight by eight.

Describing Division With Arrays

Just as using arrays can make learning and manipulating items simpler by allowing multiplication, arrays can be used to divide large numbers of items as well. Arrays can help people visualize how items are divided into small groups of equal sizes. As an example, if there are 36 oranges in a crate, the large sum can be divided into groups of equal size and a 6 x 6 grid or array created.

Dividing to create arrays out of a specific number of items demonstrates the commutative property of multiplication. For example, 36 chocolates could be divided as either a 3 x 12 array or a 12 x 3 array. The order of the factors in multiplication doesn’t affect the product when multiplying the factors, and similarly, the number of items in an entire section can be divided into different arrays without affecting the total number of items.


Photo: By Lakeworks – Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=3412522

A matrix, the plural of which is matrices, is a rectangular array. Essentially, when you have multiple arrays, they can be laid out as a matrix. Rows and columns of arrays create a matrix, and a matrix with R rows and S columns is referred to as a R x S matrix. R and S are the matrix dimensions. Individual items in a matrix are called elements, and a vector refers to a matrix with only a single row or column. For instance, a column vector describes the matrix with just one column while a row vector is a matrix that has only one row. Square matrices have the exact same number of columns and rows.

Much as arrays can be multiplied and divided, mathematical operations like addition, subtraction, and multiplication can be carried out on matrices. Matrix multiplication can be used to calculate sums. For instance, assume that there is a soda that is sold in either bottle or can form and in the three different flavors: grape, orange, and strawberry. This could be represented with a 2 x 3 matrix. The total number of sales for each element and each type of flavor can be represented in a matrix as well.

Matrices can be added and subtracted together. However, the entered number of entries must correspond with one another. You can only subtract matrices when the same dimensions are present in both matrices. For instance, an ABC matrix can be added together with a DEF matrix, because the dimensions of the matrix are the same, one by three. In the case of addition and subtraction, element one in matrix one is added to element one in matrix two, element two in matrix one is added to element two in matrix two, and element three in matrix one is added to element three in matrix three. So adding matrix ABC together with DEF would be done give a 1 x 3 matrix with the following: (A + D) (B + E) (C + F)

While matrices can be added and subtracted, they can also be multiplied together. The process for multiplying matrices together is a little more complicated than adding or subtracting matrices, however. When you multiply matrices together, the columns found in the second matrix are multiplied together with the corresponding rows found in the first matrix. If matrix A is a D by E matrix and matrix B is an F by G matrix, the results of multiplying matrices A and B together will be defined as D multiplied by G if the number of columns found in matrix A is the same as the number of rows located in matrix B. There must be the same number of columns and rows to multiply together in order for the matrices to be multiplied.

Scalar multiplication refers to the process of multiplying one value by every value found in every element of a matrix. This is different from matrix multiplication because matrix multiplication is multiplying the elements within each row of the first matrix by the elements within each column of the second matrix. When you multiply matrices together, you will be multiplying all the elements found within the first matrix’s rows with the columns that correspond with them in the second matrix. The matrix that results from the multiplication of the two matrices together will have each of its elements computed one at a time in this fashion.

What Is A Tensor?

Photo: By Components_stress_tensor_cartesian.svg: Sanpazderivative work: TimothyRias (talk) – Components_stress_tensor_cartesian.svg, CC BY-SA 3.0, https://commons.wikimedia.org/w/index.php?curid=14729540

Tensors are data containers, containing mostly numbers, though they can sometimes contain strings. Tensors are frequently used in computer science and machine learning. If arrays are single columns or rows of numbers, and matrices are made out of columns and rows (a two-dimensional container for numbers) than tensors can be a three-dimensional (or more) containers for numbers.

A grid of numbers is made out of columns and rows, and the rows and columns each represent two axes. Tensors are useful because they allow you to store multiple grids or two-dimensional matrices in their own bucket, so to speak. Think of a tensor as a cube full of numbers, made out of many grids/matrices layered on top of one another. Tensors are mathematical representations of entities which have not only magnitude but multiple directions, instead of just one direction. Tensors can theoretically get infinitely large, envision stacking cubes made out of grids/matrices together to create larger and larger tensors. You can have a fourth-dimensional tensor, a fifth-dimensional tensor, and so on all the way up to N, N being the representation for an unknown number of units within the set.

Summing Up:

Let’s quickly go through the various types of arrays.

The smallest set you can have is a single item or a single data point. After this, there are vectors. Vectors are a single column or row of numbers. Vectors could also be thought of as a one-dimensional array, having magnitude and a single direction. A matrix is a two-dimensional array. The shape of the matrix or array is defined by the two dimensions that comprise it, with an X value and a Y value. For instance, a list of people and accompanying information about these people 5000 instances long would be a 5000 by 6 array if there were six possible information features about a person. Finally, tensors are N-dimensional arrays, with a vector being a one-dimensional tensor, a matrix being a two-dimensional tensor, and beyond this, there are tensors with any given number of dimensions.

About The Author

Daniel Nelson

Daniel obtained his BS and is pursuing a Master's degree in the science of Human-Computer Interaction. He hopes to work on projects which bridge the sciences and humanities. His background in education and training is diverse including education in computer science, communication theory, psychology, and philosophy. He aims to create content that educates, persuades, entertains and inspires.

Speak Your Mind!


How The White Stork Protects Sparrows

More than 10% of bird species breed colonially, in assemblages. This strategy has several advantages. Birds in colonies can detect predators more efficiently, defend communally or perform communal feeding trips. One particular form of communal breeding is the nesting of small-bodied species, such as passerines within nests of larger birds, like raptors. Passerines that inhabit […]

Perfect Paprika Substitutes

If you are looking for a spice to substitute for paprika, there are a few different options you can use.Ā Substitutes for paprika include chili powder, cayenne powder, hot sauce, cajun spice, Aleppo peppers, black pepper, bell peppers, pimento de la Vera, red pepper flakes, and chipotle powder. Facts About Paprika Before going into spices which […]

Questioning The Applicability Of Optimum Managerial Decisions

When I received an e-mail from Trevor Nace in November 2017 asking for a short article for Science Trends, I was happy and excited. Luckily, I hate procrastinating and have amazing time-management skills; no, not really, haha. Thus, I managed to complete the short article only now, many months later. The three Science Trends example […]

BREAKTHROUGH: First Ever Treatment Discovered For Huntington’s Disease

Huntingtonā€™s disease has long been a scourge of the medical community. Huntingtonā€™s is a neurodegenerative disease that has no known cure or even treatment. That may change soon, thanks to a new breakthrough that could lead to a drug treatment to prevent the onset of Huntingtonā€™s. This is a landmark event in the treatment of […]

What Do Foxes Eat?

Foxes eat a diverse diet as omnivores, focusing on small animals such as birds, rabbits, rodents, frogs, mice, insects, and fish. Foxes are also known to eat fruits and vegetables including berries, seeds, and fungi. Foxes are one of the prolific types of mammals in the world, living on every continent except Antarctica. Foxes are […]

Exploring How Illness Affects Short- And Long-Term Memory

Most people who have had a bad cold or dose of the flu will be well aware how feeling physically unwell can also make our cognitive or mental abilities less efficient. This is not simply because we are distracted by aches and pains and feelings of fatigue and general malaise, but partly due to direct […]

List Of Metals And Non Metals

The metals list which makes up the periodic table includes iron, lead, gold, aluminum, platinum, uranium, zinc, lithium, sodium, tin, silver, etc. The nonmetals list which makes up the periodic table includes hydrogen, helium, carbon, sulfur, nitrogen, oxygen, radon, neon, other halogens, and noble gases etc. When we study the elements, it is important to […]