I am trying to study eigenvalues and eigenvectors using Mathematica. I am trying to compute $A-\lambda I$, so I created a matrix A and a matrix with $\lambda$ in the diagonal:
A = {{1, 2, 1}, {6, -1, 0}, {-1, -2, -1}}
L = DiagonalMatrix[{[Lambda], [Lambda], [Lambda]}] // MatrixForm
To compute the subtraction I evaluate A - L // MatrixForm, which yields the following output:
I was expecting, e.g., the first element to show as $1-\lambda$, ¿what is wrong? Any hints would be much appreciated!

MatrixFormis only for displaying purposes. Just don't use it. – Henrik Schumacher Oct 03 '18 at 19:09MatrixFormanywhere.A = {{1, 2, 1}, {6, -1, 0}, {-1, -2, -1}}; L = DiagonalMatrix[{\[Lambda], \[Lambda], \[Lambda]}]; A - L– Henrik Schumacher Oct 03 '18 at 19:11MatrixForm[]. Remove all instances of it in your code. If it still does not work, please edit your question to show it, and we can release the hold. – J. M.'s missing motivation Oct 03 '18 at 19:12