Create a diagonal matrix or make a column from the diagonal values of a matrix

Calc > Matrices > Diagonal

Select the action that you want to perform.

Make diagonal matrix

Complete the following steps to create a matrix that has diagonal values from a column in the worksheet.

  1. In Using column, enter the column that contains the values for the diagonal of the matrix.
  2. In Store result in, enter a number (for example, M1) or a name for the diagonal matrix. If the name contains spaces, enclose the name in single quotation marks.
C1
 
11
22
33
44
Column
11 0 0 0
0 22 0 0
0 0 33 0
0 0 0 44
Resulting matrix

Copy diagonal

Complete the following steps to make a column in the worksheet from the diagonal values of a matrix.

  1. In From matrix, enter the matrix that you want to copy values from.
  2. In Store result in, type a number (for example, C1) or a name (for example, Values) for the storage column. If the name contains spaces, enclose the name in single quotation marks.

The storage column contains the values from the matrix.

11 0 0 0
0 22 0 0
0 0 33 0
0 0 0 44
Matrix
C1
 
11
22
33
44
Resulting storage column