Is the center of a ring an ideal? Let $Z(R) = \{ a \in R : ax = xa,\text{ for all $x \in R$}\}$
Is $Z(R)$ an ideal of $R$?
Attempt: I already proved that $Z(R)$ is a subring of $R$.
I would say yes, since if $x \in R$, then $xa$ is an element in $Z(R)$ and if $a\in Z(R)$ then we have $ax\in Z(G)$. So by definition it is an ideal for $R$.
Please can anyone please give some feedback? 
Thank you.
 A: To show $I = Z(R)$ is an ideal,  you need to show two things: (1) $I$ is an additive subgroup of $R$.  (2) $I$ absorbs $R$ on both sides.  You showed (2) already.  The quickest way to (1) is showing that $I$ is closed under the binary map $f(x,y) = x - y$.  Then from that you can prove that you indeed have an additive group.  
Let $x, y \in I$.  Then for any $a \in R$, $a(x-y) = ax - ay = xa - ya = (x - y) a$ from the ring axioms, so $I$ is closed under subtraction. QED
$a \in R , x \in Z(R) \implies (ax)b = a(xb) = abx \neq b(ax)$ necc. So you were wrong about the first part.  It is an additive subgroup though!
A: Hint: If $I$ is an ideal in a ring $R$ and $1\in I$, then $I=R$. Moreover, one may show that $1\in Z(R)$. Hence $Z(R)$ is an ideal if and only if $Z(R)=R$. Can you use this to find a counterexample?
The hint above tells us that $Z(R)$ is an ideal of $R$ if and only if $R$ is a commutative ring. So letting $R$ be your favorite noncommutative ring (say the ring of $n\times n$ matrices over $\Bbb C$) gives a counterexample.
A: The center of a ring need not be an ideal; below is a counterexample that illustrates a previous answer.
Recall that a subring $A$ is called an ideal of $R$ if $ar,ra \in A,\forall a \in A,\forall r \in R$. 
Let $R = \mathsf{M}_n(\mathbb{R})$. It is a nontrivial fact that $Z(R) = \{ x I_n \in \mathsf{M}_n(\mathbb{R}) \mid x \in \mathbb{R}\}$, i.e., $Z(R)$ consists of all scalar matrices.
Claim: $Z(R)$ is not an ideal of $R$.
Proof. Consider the $n$-by-$n$ exchange matrix (also called the backward identity matrix) defined by 
$$
K_n = 
\begin{bmatrix}
e_n & e_{n-1} & \cdots & e_2 & e_1
\end{bmatrix},
$$
where $e_k$ denotes the $k^\text{th}$ column of $I_n$. For example, when $n = 3$, notice that
$$
K_3 = 
\begin{bmatrix}
0 & 0 & 1 \\
0 & 1 & 0 \\
1 & 0 & 0
\end{bmatrix}.$$
Since $K_n I_n = I_n K_n = K_n \not \in Z(R)$, it follows that $Z(R)$ is not an ideal.
