Description
Require a nonempty square numeric matrix and return Math.sign of each diagonal entry.
A sign count classifies selected numeric entries as positive, negative, or exactly zero. The selected positions and comparison convention determine the count; magnitudes and numerical tolerances are separate questions.
Require a nonempty square numeric matrix and return Math.sign of each diagonal entry.
When to use this tool
Use Matrix Diagonal Sign Mask when you need an exact sign summary of the selected matrix entries.
How to use the tool and how it works
- Enter matrix. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read signs. Use the output convention below.
Require a nonempty square numeric matrix and return Math.sign of each diagonal entry.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| matrix | Matrix | Required. Array of array of finite number; maximum items 128; maximum items 128. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| signs | Signs | Required. Array of safe integer; maximum items 256. |
{
"input": {
"matrix": [
[
2,
1
],
[
-4,
-3
]
]
},
"output": {
"signs": [
1,
-1
]
}
} Limitations and assumptions
- Signs use exact zero rather than a tolerance; this is not an eigenvalue, definiteness, or whole-matrix sign analysis.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Inspect magnitudes, selection rules, and any intended zero tolerance before drawing a numerical conclusion.
References
Similar or alternative tools
- Confusion Table Transpose Convention
Retain it when rowsAreActual or transpose it otherwise, returning actualRowsPredictedColumns.
- Matrix Transpose Shape Pair
Require nonnegative integer rows and columns and swap them for transposedRows and transposedColumns.