Given A and Find B such that $\frac{\lVert A_n-B\rVert_\infty}{\lVert A_n \rVert_\infty} - \frac{1}{K(A_n)}$ < $\frac{1}{n^2}$ $A_n=\begin{bmatrix}
        1 & 2  \\
        2 & 4+1/n^2\\
        \end{bmatrix}$
How can we find  singular B such
$\frac{\lVert A_n-B\rVert_\infty}{\lVert A_n \rVert_\infty} - \frac{1}{K(A_n)}$ <  $\frac{1}{n^2}$
$A_n^{-1}=\begin{bmatrix}
        4n^2+1 & -2n^2  \\
        -2n^2 & n^2\\
        \end{bmatrix}$
Then, we can find $K(A_n)$. But then I don't know what to do. (K refer condition number.)

The condition number $\kappa(A) = \| A \| \| A^{-1}\| $ can take any norm. So I'll assume you're also using  $\|\cdot \|_{\infty}$.
First we have $ \frac{\| A_{n} - B \|_{\infty} }{\| A_{n} \|_{\infty} } - \frac{1}{\kappa(A_{n})} = \frac{\| A_{n} - B \|_{\infty} }{\| A_{n} \|_{\infty} } - \frac{1}{\|A_{n}\|_{\infty} \| A_{n}^{-1} \|_{\infty}}$

Let's find $\| A_{n}\|_{\infty} $ and $\| A_{n}^{-1}\|_{\infty} $
$ \|A_{n}\|_{\infty} = \max \{3 , 6 + \frac{1}{n^{2}}  \} = 6 + \frac{1}{n^{2}}$
Now, first $A^{-1} =  \begin{bmatrix} 4n^{2} + 1 & -2n^{2} \\ -2n^{2} & n^{2} \end{bmatrix}$.
Now, we get $ \|A_{n}^{-1}\|_{\infty} = \max \{ 6n^{2}+1, 3n^2 \} = 6n^{2}+1 $.

Now,  we have
$ \frac{\| A_{n} - B \|_{\infty} }{\| A_{n} \|_{\infty} } < \frac{1}{\kappa(A_{n})} + \frac{1}{n^2}  $
Get a common denominator
$ \frac{\| A_{n} - B \|_{\infty} }{\| A_{n} \|_{\infty} } <\frac{n^{2}+\kappa(A_{n})}{n^{2} \kappa(A_{n})} $
Now multiply by $\kappa(A_{n})$
$\| A_{n} - B \|_{\infty}   <\frac{\| A_{n} \|_{\infty} ( n^{2}+\kappa(A_{n})) }{n^{2} \kappa(A_{n})} $
Replace $\kappa(A_{n}) = \|A_{n}\|_{\infty} \| A_{n}^{-1} \|_{\infty}$
$\| A_{n} - B \|_{\infty}   <\frac{\| A_{n} \|_{\infty} ( n^{2}+\kappa(A_{n})) }{n^{2} \|A_{n}\|_{\infty} \| A_{n}^{-1} \|_{\infty} } $
Now cancel $ \|A_{n} \|_{\infty}$
$\| A_{n} - B \|_{\infty}   <\frac{n^{2}+\kappa(A_{n}) }{n^{2} \| A_{n}^{-1} \|_{\infty} } $
Replace $\kappa(A_{n}) = \|A_{n}\|_{\infty} \| A_{n}^{-1} \|_{\infty}$
$\| A_{n} - B \|_{\infty}   <\frac{n^{2}+\|A_{n}\|_{\infty} \| A_{n}^{-1} \|_{\infty} }{n^{2} \| A_{n}^{-1} \|_{\infty} }  = \frac{\| A_{n}\|_{\infty} }{n^{2}} + \frac{1}{\| A_{n}^{-1} \|_{\infty} }$

Now substitute in some things
$ = \frac{ 6  + \frac{1}{n^2} }{n^{2}} + \frac{1}{6n^{2}+1}  =\frac{37n^{4}+12n^{2}+1}{n^{4}(6n^{2}+1)}$
And suppose that $ B = \begin{bmatrix} a & b \\ c &  d\end{bmatrix} $ then we will find that $ \| A_{n} - B\|_{\infty} = \max \{ |1-a| + |2-b| , |2-c| + |4+\frac{1}{n^{2}}  -d| \} $
and
$ \max \{ |1-a| + |2-b| , |2-c| + |4+\frac{1}{n^{2}}  -d| \}  < \frac{37n^{4}+12n^{2}+1}{n^{4}(6n^{2}+1)}$
Now
$ B = \begin{bmatrix}  1 &  2 \\ 2 & 4 \end{bmatrix}$
This matrix is singular

It gives us
$ \max \{ 0 , \frac{1}{n^{2}} \} = \frac{1}{n^{2}}  < \frac{37n^{4}+12n^{2}+1}{n^{4}(6n^{2}+1)}$
