Skip to content

2. What is The Matrix?

Note: In this problem, you’re asked to enter some APL code, including an APL symbol and the data (text or numbers) given to it. Your code will be tested by the APL Challenge system to check whether it gives the correct answer and uses the methods described below.

A matrix is a table of numbers, arranged along two axes. We call these rows and columns. We can write a matrix by enclosing its content in square brackets ( [] ) with each row written as a list from problem 1 and the rows separated by a (diamond). For example, a three-row, four-column matrix of the numbers from 1 to 12 can be written [1 2 3 4 ⋄ 5 6 7 8 ⋄ 9 10 11 12]. This corresponds to the table:

1234
5678
9101112

Write a two-row, two-column matrix of 1s.