What is a matrix in a computer science?
A Two dimensional data sctructure made of rows and columns
What operation is possible only if two matrices have the same dimensions?
Addition
How is a matrix usually rapresented in programming languages?
As a two-dimensional array
What happens if you access an index that not exist?
A runtime error
What is matrices commonly used?
Graphics, games, data prosessing and images
How do you descibe the size of a matrix?
Rows x Columns ( ex. 3 x 4)
What happens when tou add two matrices?
Corresponding elements are added together
How do you access an element of a matrix?
Using two indices: row and column
What is the problem with mixing up rows and columns?
Program crashes or Incorrect result
How is an image represented in computer science?
As a matrix made of pixels
How do you call a matrix with only one row?
Row matrix
When can two matrices be multiplied?
When the number of columns of the first equals the number of rows of the second
Which control structure is commonly used to scan a matrix?
Two nested loops
Why it is important to inizialize a matrix?
To avoid undefined or null values
What is a traspose matrix?
A matrix obtained by swapping rows and columns
What happens if you try to multiply incompatible matrices?
The result of the operation is "not defined"
What is a square matrix?
A matrix with the same number of rows and columns
What is the identity matrix?
A square matrix with 1s on the main diagonal and 0s elsewhere
Why can large matrices slow down a program?
They require a lot of memory and computation time