Avoiding singular matrices